Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Linux VPS Support

Notices

Reply
 
Thread Tools
  #1  
Old 12-01-2009, 02:15 PM
ampped80 ampped80 is offline
Hatchling Croc
 
Join Date: Oct 2008
Posts: 14
Default Automated VPS Account backups using SFTP (not FTPS)

Hello everyone,
Can anyone point me to a program and/or script that will allow me to.

Automate VPS account backups and somehow download them to my computer using SFTP (not FTPS, all accounts do not have a SSL Cert). I want the download to be secure NO plain FTPing.

Thanks!
Reply With Quote
  #2  
Old 12-01-2009, 03:01 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,553
Default Re: Automated VPS Account backups using SFTP (not FTPS)

I don't understand what you mean by "all accounts do not have a SSL Cert".

If you connect from your VPS to your computer using FTPS or FTPES then there must be a certificate in your computer, where you connect to.

Maybe the easiest solution would be to use WHM backup feature to backup accounts to /backup and then rsync (or SFTP or SCP or whatever) the backups to your computer.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #3  
Old 12-01-2009, 04:59 PM
ampped80 ampped80 is offline
Hatchling Croc
 
Join Date: Oct 2008
Posts: 14
Default Re: Automated VPS Account backups using SFTP (not FTPS)

Thanks for the reply. I am looking for an automated solution. I want the backup to run on a predetermined schedule and I want the resulting file to be securely downloaded to my local computer.

Can rsync do that?

What I meant by "all accounts do not have a SSL Cert" was that until now all backup options that almost do everything I want uses the account's cpanel to do the backup not the VPS WHM. However, they ALL use either regular FTP or FTPS to do the file download.

The option you presented was the first to use WHM as the method for constructing the backup. I am aware of the WHM way of doing backups, but I have not found anything that will allow for an AUTOMATIC backup to be created and downloaded "securely" to my local computer.

SO, I do understand that I have a certificate in my computer for the VPS. However, part of my problem still remains. I need it to be automatic.

Please do not get me wrong. I do appreciate your suggestion and I am hoping that after my explanation I have given you enough details to understand what I am trying to do.
Reply With Quote
  #4  
Old 12-01-2009, 08:26 PM
ampped80 ampped80 is offline
Hatchling Croc
 
Join Date: Oct 2008
Posts: 14
Default Re: Automated VPS Account backups using SFTP (not FTPS)

ok soo I think I have found my solution (that I will share when I am SURE it is working properly). Just have two questions.

When I do a home directory backup of a cpanel account, does that include MySql databases?

Secondly when I log into my VPS (as root using SCP) in my home directory I see all of my accounts.

Is it safe to assume that if I backup this "home" directory on my VPS it is the same as backing up the home directory for a specific account (Just for all my accounts)?
Reply With Quote
  #5  
Old 12-02-2009, 05:55 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,553
Default Re: Automated VPS Account backups using SFTP (not FTPS)

Quote:
Originally Posted by ampped80 View Post
ok soo I think I have found my solution (that I will share when I am SURE it is working properly). Just have two questions.

When I do a home directory backup of a cpanel account, does that include MySql databases?
No.


Quote:
Originally Posted by ampped80 View Post
Secondly when I log into my VPS (as root using SCP) in my home directory I see all of my accounts.

Is it safe to assume that if I backup this "home" directory on my VPS it is the same as backing up the home directory for a specific account (Just for all my accounts)?
root's home directory is /root

All the accounts are located in /home, as:
/home/user1
/home/user2
/home/user4
etc.

If you back up those directories it's the same as doing home directory backup in cPanel, and you don't get databases.

For me it seems that you are thinking of this the wrong way. i.e. you want to download the backups to your computer, when you should let the server do the backups and then upload the backups to your PC (or elsewhere).
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #6  
Old 12-02-2009, 06:19 AM
ampped80 ampped80 is offline
Hatchling Croc
 
Join Date: Oct 2008
Posts: 14
Default Re: Automated VPS Account backups using SFTP (not FTPS)

QuietFinn thanks for setting me straight. I think I understand. Except for one thing. How would I allow the server to
UPLOAD to my pc?
Reply With Quote
  #7  
Old 12-02-2009, 06:33 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,553
Default Re: Automated VPS Account backups using SFTP (not FTPS)

Quote:
Originally Posted by ampped80 View Post
QuietFinn thanks for setting me straight. I think I understand. Except for one thing. How would I allow the server to
UPLOAD to my pc?
For that you'd of course need to run FTP or SSH server in your PC.
For a while I was running a Linux server in my home office just for that, but nowadays I am using an off-site backup service.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #8  
Old 12-02-2009, 07:07 PM
ampped80 ampped80 is offline
Hatchling Croc
 
Join Date: Oct 2008
Posts: 14
Default Re: Automated VPS Account backups using SFTP (not FTPS)

Is there FTP server of SSH server that you would recommend? The terms 'ftp server' and 'SSH server' are new to me.
Reply With Quote
  #9  
Old 12-12-2009, 01:22 PM
ampped80 ampped80 is offline
Hatchling Croc
 
Join Date: Oct 2008
Posts: 14
Default Re: Automated VPS Account backups using SFTP (not FTPS)

ok Here is my solution.

I have configured VPS WHM automated backup to do a backup of my accounts everyday. I use WinSCP to move the file to my computer. I found a script on the Winscp website that allows me to add a time stamp to the filename as it is moved to my computer. So while the WHM backup file is in this format (username.tar.gz), when it is moved with WinSCP the file on my computer is in this format (mm.dd.yy_hh.mm.ss_username.tar.gz). I use windows scheduler to automate the running of the script.

So, the next day WHM overwrites the remote backup (username.tar.gz). Windows scheduler runs the script and the file is transfered securely and the local file has the name mm.dd.yy_hh.mm.ss_username.tar.gz this allows me to keep an archive of the backups.

Thanks quietFinn for everything you suggested to help me on this.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OUTBOUND sftp connections from gatorxxx to sftp.host.invalid rec9140 Shared Hosting Support 4 06-15-2009 01:22 PM
Backups and automated emails rookhappy Pre-Sales Questions 5 06-16-2008 02:50 AM
Automated Backups cleanxhost Pre-Sales Questions 4 09-17-2007 05:50 PM
rsync / backups (resellers account) webmetric Pre-Sales Questions 2 11-16-2006 05:09 AM

All times are GMT -5. The time now is 03:41 AM.