Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    3

    Default Transfer Incremental Backups to Remote FTP

    I perform incremental backups of my server on a secondary hard drive, as WHM will not allow incremental backups to a remote FTP. For added security, I recently purchased a remote FTP to store copies of the backups. My problem is, how am I to go about transfering the files stored on my server to the remote FTP (I am running a Linux based system)? I know that programs exist to transfer files, but I cannot find one to transfer directory structures as well. The size of the backups is about 50-60GB. Additionally, is there a way to make sure that as the transfer is taking place, it is not overloading the server?

  2. #2
    Member linux-image's Avatar
    Join Date
    Jun 2004
    Location
    India
    Posts
    1,185
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    if it is just to move a file check for the command "scp"

  3. #3
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Moving a 50-60Gb backup over the network isn't a fantastic idea, it will take ages, unless you're local to the FTP box you've bought.

    The best way to do it is probably to tar the directory hierarchy up into a compressed tar image. (Scp will take forever on a backup of that size.) Once you have the backup, then you scan scp or ftp it to your remote box in one hit. This isn't exactly a trivial exercise as far as writing shell or PHP code is concerned, so good luck!

    (The good news is that compression will probably make the backup a lot smaller, maybe even 80% smaller if it is mainly web pages and databases and logs).

  4. #4
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Try this for using rsync (much better than SFTP or SCP)

    Code:
    #/bin/bash
    
    # Backup to backup server 
    
    DATE=`/bin/date +%Y.%m.%d::%H:%M`
    HOST=`hostname`
    BCKUSER="REMOTE USER ID"
    BCKSERV="REMOTE SERVER NAME"
    SSH="/usr/bin/ssh -l $BCKUSER $BCKSERV "
    list="/backup/cpbackup/daily"
    
    rsync -av --delete -e ssh $list $BCKUSER@$BCKSERV:/backup/$HOST
    Best is to also setup a public/private key between the two so that you do not have to deal with supplying or hardcoding a password.

    But I must agree, unless the ftp server is local to your server, it will take a painstakingly long time and will be using your bandwidth. Keep also in mind that by using rsync, future copy overs will only copy what has changed, so it will/can be less time.
    Last edited by dgbaker; 11-16-2004 at 06:27 AM.
    Regards,
    David
    Forum Moderator

  5. #5
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Actually, I think the best rsync tool is rsnapshot - http://www.rsnapshot.org - check it out, it keeps several days worth of backups online using minimal disk space. Very nice stuff

    But definitely, I should have mentioned rsync too, it's advantage is that it will only send the files that have changed each time you do a backup.

Similar Threads & Tags
Similar threads

  1. Remote incremental backups
    By cwalke32477 in forum Data Protection
    Replies: 4
    Last Post: 06-09-2010, 12:14 PM
  2. Incremental or FTP Backups? Why not BOTH?
    By sneader in forum Data Protection
    Replies: 7
    Last Post: 11-29-2008, 11:37 PM
  3. Remote FTP Backups
    By eglwolf in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-14-2005, 11:51 AM
  4. Incremental Backups not working via ftp
    By the_techs in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 06-29-2005, 07:35 PM
  5. Incremental Compressed Backups FTP to remote site
    By djblamire in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-18-2004, 05:04 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube