Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Mar 2008
    Posts
    13

    Lightbulb cpbackup to two servers

    Hi There,

    We are looking to increase the redundancy of our backups and were wondering it is possible to make the cpbackup send the backups off to two remote ftp locations instead of just one?

    Cheers,

    Ben

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Ben Harris View Post
    Hi There,

    We are looking to increase the redundancy of our backups and were wondering it is possible to make the cpbackup send the backups off to two remote ftp locations instead of just one?

    Cheers,

    Ben
    That functionality is not natively supported at this time.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    397

    Default

    You will need a standalone script to do this. There are some ftp scripts that do this, it grabs the existing backup files and sends them to a remote location.

  4. #4
    Member
    Join Date
    Mar 2008
    Posts
    13

    Exclamation

    Hi Guys,

    Thanks for the replies, I just took a look at the /scripts/cpbackup script, I see that basically after the backup is created it calls the ftpsend() sub (line 727) which basically puts the backup on the remote server via FTP.

    Now I have never used perl before, so this is pretty alien to me, but if we were to just duplicate the ftpsend sub and name it say ftpsend1 then just replace the local variables with the variables for the second server (so basically just change $ftpuser,$ftppass and $ftphost). Then add ftpsend1() just before
    Code:
    unlink("${target}/${user}.tar.gz");
    So it would read

    Code:
    ftpsend( "$target", "${target}/${user}.tar.gz", "${user}.tar.gz" );
    ftpsend1( "$target", "${target}/${user}.tar.gz", "${user}.tar.gz" );
    unlink("${target}/${user}.tar.gz");
    Do you think this would work. Obviously it would be more efficient to add a for loop and take the data entry as an array from the cpanel entry, but I think this method would be easier if cpanel update the script.

    Any thoughts?

    Cheers,

    Ben

  5. #5
    Member
    Join Date
    Dec 2008
    Posts
    153

    Default

    You could copy the cpbackup into postcpbackup, and change the values... if you wish.

  6. #6
    Member
    Join Date
    Mar 2008
    Posts
    13

    Default

    Quote Originally Posted by jhyland87 View Post
    You could copy the cpbackup into postcpbackup, and change the values... if you wish.
    @jhyland87 - Cheers for that, I didnt know about postcpbackup. I googled it and found this article which is perfect for my situation.

    Richy’s Random Ramblings » cPanel: Simple Script To Backup Over rSync

    Cheers,

    Ben

  7. #7
    Member
    Join Date
    May 2006
    Location
    Johannesburg, South Africa
    Posts
    881

    Default

    Isn't it better to rsync the backups from the backup server to the stanby-by backup server? This will cause less load on your cPanel server as well
    • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
    • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
    • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
    SoftDux- The Leaders in Software
    Use the coupon: cpanel-06 to get 20% off our packages

Similar Threads & Tags
Similar threads

  1. Error cpbackup on two servers
    By cesarlwh in forum Data Protection
    Replies: 6
    Last Post: 03-06-2009, 12:57 PM
  2. Backing up cpbackup's with rsync and what cpbackup's is
    By marcz908 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-29-2007, 11:22 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube