Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    932
    cPanel/Enkompass Access Level

    Root Administrator

    Default Incremental or FTP Backups? Why not BOTH?

    I believe incremental backups to a local drive is the fastest and easiest
    way to do backups, and it works very well (thank you cPanel!)

    However, for safety, I would sleep better if I had backups on a remote FTP
    server, at least once per week.

    In fact, my data center offers 50GB of backup space on their off-site FTP
    server at no extra charge.

    The problem is... how to utilize it???

    I do not want to stop doing incremental backups.

    I cannot just FTP the incremental backups (i.e. /backup/cpbackup/daily) because I would lose file ownership and permissions.

    What I really need is a way to occasionally switch to FTP Backup mode, and let pkgacct make some nice tar.gz files of each account and have them FTP'd to the Remote FTP server. Perhaps weekly.

    Any ideas?

    I put in a Feature Enhancement Request in with cPanel. If you'd like to add comments, vote, etc., see http://bugzilla.cpanel.net/show_bug.cgi?id=8057

    - Scott

  2. #2
    Member
    Join Date
    Nov 2008
    Posts
    11

    Default

    why don't you just use rsync? it's very good, and preserves file ownership too. you can set it up to run in crons for a weekly task for example.

    I have one running everyday, just after my cpanel backups complete.

  3. #3
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    932
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by haxxor23 View Post
    why don't you just use rsync? it's very good, and preserves file ownership too. you can set it up to run in crons for a weekly task for example.

    I have one running everyday, just after my cpanel backups complete.
    ... because my data center only provides FTP backups, with no option for rsync.

    - Scott

  4. #4
    Member
    Join Date
    Nov 2008
    Posts
    11

    Default

    Quote Originally Posted by sneader View Post
    ... because my data center only provides FTP backups, with no option for rsync.

    - Scott
    well, then just get an off site backup at a different datacenter .... they only cost about 50 cents per gigabyte per month ..... and besides, your data is safer being stored in another location...

  5. #5
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by sneader View Post
    I believe incremental backups to a local drive is the fastest and easiest
    way to do backups, and it works very well (thank you cPanel!)

    However, for safety, I would sleep better if I had backups on a remote FTP
    server, at least once per week.

    In fact, my data center offers 50GB of backup space on their off-site FTP
    server at no extra charge.

    The problem is... how to utilize it???

    I do not want to stop doing incremental backups.

    I cannot just FTP the incremental backups (i.e. /backup/cpbackup/daily) because I would lose file ownership and permissions.

    What I really need is a way to occasionally switch to FTP Backup mode, and let pkgacct make some nice tar.gz files of each account and have them FTP'd to the Remote FTP server. Perhaps weekly.

    Any ideas?

    I put in a Feature Enhancement Request in with cPanel. If you'd like to add comments, vote, etc., see http://bugzilla.cpanel.net/show_bug.cgi?id=8057

    - Scott
    The quickest (and untested) method I can think of doing this is to have two backup configurations. One for the Incremental, the other for the FTP. I think you also need a separate location to store the FTP archives before transmitting.

    Set a cron job to run a few minutes before backup actually starts. The job could check the day of the week and swap out the backup configuration files depending upon the day. This way you could run Incremental Mon - Sat and FTP on Sunday, as an example.

    Doing it this way will lessen the load on your server. The other way that came to mind was to have /scripts/postcpbackup swap the backup configurations and re-run the backup.

  6. #6
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    932
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Thanks Kenneth... I actually thought about this, but did not know where the backup configurations were stored?

    - Scott

  7. #7
    Member
    Join Date
    Oct 2004
    Posts
    45

    Default

    How about this as a much more elegant solution:

    make use of the /scripts/postcpbackup functionality.

    write yourself a script that does the following:

    checks when the last /backup/cpbackup/weekly was run,

    tar up the weekly directory if it was run within the last 24 hours and then ftp the tar of the weekly directory offsite.

    This is a simple 10-20 line shell script and makes what you want to do trivial.

    hint:

    find /backup/cpbackup/weekly -mtime 0

    is a great test to identify the files that have changed within the last 24 hours.

    If files have changed, then tar them up and ftp them over.

    hint2:

    man netrc to learn how to do an automated ftp transfer.

    If you can't write a script to do this from the hints I have given, then feel free to contact me and I'll give you a price

  8. #8
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    932
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Thanks for the feedback and ideas (and offer to help).

    I have done some testing with FTP (just using the built-in cPanel FTP backup feature) and am concerned about the load on the server and length of time it takes.

    I have another idea, which will use rsync instead of FTP, which should keep the load down and length of time down, since only changed files will be copied.

    If it doesn't pan out, I may hit you up for help with the script!

    Thanks again!

    - Scott

Similar Threads & Tags
Similar threads

  1. 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
  2. Incremental backups
    By maxihost2 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-23-2005, 06:42 PM
  3. 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
  4. Transfer Incremental Backups to Remote FTP
    By jasons in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-17-2004, 06:16 AM
  5. Problem With Incremental Backups?
    By ShelaghG in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-22-2004, 11:36 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube