LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-19-2013, 05:05 AM   #1
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Rep: Reputation: 0
Automated backup to remote server via FTP


Hello,

I have nightly .tar backups coming into /var/www/backups. The backups are huge and the HDD is not huge. So, I would like to offload these backups from that server onto another server via FTP.

Backups are made midnight. I'd like these files to be moved at, say, 1am. After the transfer is done, I'd like to remove these source files.

So, basically, /var/www/backups will be monitored at 1am nightly and all files in there will be moved to another server. I have webmin on this server and I'm running CentOS 5.8.

Any suggestions or help will be very appreciated!
Thanks!
 
Old 02-19-2013, 08:01 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,817

Rep: Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554
1. consider using the z (gzip) or j (bzip2) flag when creating the .tars; these will compress them, saving on disk space and network txfr speeds

2. for security, I'd recommend using scp or sftp using ssh auth-keys to copy to another system.

3. another option is rsync (preferably using ssh )

4. best thing is to add the file txfr code into the end of the backup scripts; that way you don't have to worry about timing (ie overruns of backups and it txfrs immediately backup completes)

HTH
 
Old 02-19-2013, 09:21 PM   #3
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
1. consider using the z (gzip) or j (bzip2) flag when creating the .tars; these will compress them, saving on disk space and network txfr speeds

2. for security, I'd recommend using scp or sftp using ssh auth-keys to copy to another system.

3. another option is rsync (preferably using ssh )

4. best thing is to add the file txfr code into the end of the backup scripts; that way you don't have to worry about timing (ie overruns of backups and it txfrs immediately backup completes)

HTH
Appreciate the help.
But I didn't feel that I have to mention that the directory will have gzip/tar files. That part is taken care of.
I only have FTP (meaning transfering to a Windows box) as a backup option - not ssh/scp. :/
 
Old 02-19-2013, 11:11 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,817

Rep: Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554
Ah well, now we have more info

In that case, my point 4 still stands.

I'm guessing you're not worried about security (2 & 3).

If you've only got ftp, have a look at ncftp (actually ncftpput http://linux.die.net/man/1/ncftpput) and lftp http://linux.die.net/man/1/lftp; both are scriptable ftp tools.
 
Old 02-20-2013, 01:03 AM   #5
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
Ah well, now we have more info

In that case, my point 4 still stands.

I'm guessing you're not worried about security (2 & 3).

If you've only got ftp, have a look at ncftp (actually ncftpput http://linux.die.net/man/1/ncftpput) and lftp http://linux.die.net/man/1/lftp; both are scriptable ftp tools.
That looks great!
Thanks!!
 
Old 02-20-2013, 01:18 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,817

Rep: Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554
Oh, and use cron for automation timing (unless of course you've already thought of it )
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can backup a remote server(only folder needed) with ftp ,daily backup? ahjafari Linux - Newbie 1 10-26-2011 05:04 PM
[SOLVED] Automated remote backup of laptop using RSnapshot lpallard Slackware 20 01-09-2011 10:31 AM
Remote, automated backup: Windows --> Linux server hamish Linux - Software 1 12-07-2004 11:46 AM
Automated Backup via FTP KePSuX Linux - Newbie 3 02-11-2004 09:25 AM
automated FTP backup josephswagner Linux - Software 2 06-06-2003 05:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration