Results 1 to 17 of 17

Thread: Backups

  1. #1
    Join Date
    Dec 2008
    Location
    Florida
    Posts
    1,052

    Backups

    Could anyone give me any recommendations on a new backup solution?

    The one that I have been using didn't work the past few times, and that is starting to bother me.

    I've looked into CDP, although I do not necessarily have the budget for that.

    I'm just looking for an easy way to do daily and weekly backups with

  2. #2
    Join Date
    Feb 2006
    Location
    San Francisco, California
    Posts
    469
    are you talking about backups for a CPanel machine?
    Larry Bly
    Sandbox IT Solutions, LLC.
    www.SandboxITSolutions.com
    Dedicated Servers - Web Hosting - Consulting Services

  3. #3
    Join Date
    Dec 2008
    Location
    Florida
    Posts
    1,052
    Quote Originally Posted by larry2148 View Post
    are you talking about backups for a CPanel machine?
    Yes sir
    Not sure what to put here :-P

  4. #4
    Join Date
    Feb 2006
    Location
    San Francisco, California
    Posts
    469
    You can write your own script that uses the pkgacct function to make backups and then use SCP to move them to another server. You'll have to use a for loop to read the users out of /var/cpanel/users.

    Alternatively you could actually just use the FTP backup functionality, but I've heard it's kind of unstable.
    Larry Bly
    Sandbox IT Solutions, LLC.
    www.SandboxITSolutions.com
    Dedicated Servers - Web Hosting - Consulting Services

  5. #5
    Join Date
    Dec 2008
    Location
    Florida
    Posts
    1,052
    Quote Originally Posted by larry2148 View Post
    You can write your own script that uses the pkgacct function to make backups and then use SCP to move them to another server. You'll have to use a for loop to read the users out of /var/cpanel/users.

    Alternatively you could actually just use the FTP backup functionality, but I've heard it's kind of unstable.
    Do you have any recommendations or maybe some sort of a tutorial I could somewhat follow for the script? That's not my strong area when it comes to programming, I do more PHP, MySQL, ASP, and learning java.

    Thanks for the tips though, they are well appreciated.
    Not sure what to put here :-P

  6. #6
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,963
    For ftp, maybe this can help: http://www.webhostgear.com/index.php?art/id:174
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  7. #7
    Join Date
    Nov 2003
    Posts
    516
    What are you using for your present backup solution?

    You could have a dedicated hard drive for the backups using the cpanel backup system. However, it's not off-site. So if the data center faces catastrophic failure such as fire, theft, etc... you're screwed... so maybe that's a deal breaker right there I suppose

  8. #8
    Join Date
    Dec 2008
    Location
    Florida
    Posts
    1,052
    I just do basic backups by hand currently, was looking for a more automated solution.

    I see your point Devil, it's a win-lose situation, works but can fail.

    Thanks net, I'll definitely look into that.
    Not sure what to put here :-P

  9. #9
    Join Date
    Aug 2008
    Location
    Shoreline WA
    Posts
    160
    You can look into using rsync and cp -la to get a nice uncompressed incremental backup. A simple example would be this:

    Code:
    #!/bin/bash
    
    # 20081107 - Original root to user incremental rsync backup script by Jonathan Kinney
    # 20081107 - Added --chmod=Du+r,Du+w,Du+x to clear up directory permission errors
    #            when using unprivileged user in the ssh destination
    
    BKDIR=/home/violentsheepmusic.org/rsync-backup
    
    if [ -d $BKDIR.14 ];then /bin/rm -rf $BKDIR.14;fi
    if [ -d $BKDIR.13 ];then /bin/mv $BKDIR.13 $BKDIR.14;fi
    if [ -d $BKDIR.12 ];then /bin/mv $BKDIR.12 $BKDIR.13;fi
    if [ -d $BKDIR.11 ];then /bin/mv $BKDIR.11 $BKDIR.12;fi
    if [ -d $BKDIR.10 ];then /bin/mv $BKDIR.10 $BKDIR.11;fi
    if [ -d $BKDIR.09 ];then /bin/mv $BKDIR.09 $BKDIR.10;fi
    if [ -d $BKDIR.08 ];then /bin/mv $BKDIR.08 $BKDIR.09;fi
    if [ -d $BKDIR.07 ];then /bin/mv $BKDIR.07 $BKDIR.08;fi
    if [ -d $BKDIR.06 ];then /bin/mv $BKDIR.06 $BKDIR.07;fi
    if [ -d $BKDIR.05 ];then /bin/mv $BKDIR.05 $BKDIR.06;fi
    if [ -d $BKDIR.04 ];then /bin/mv $BKDIR.04 $BKDIR.05;fi
    if [ -d $BKDIR.03 ];then /bin/mv $BKDIR.03 $BKDIR.04;fi
    if [ -d $BKDIR.02 ];then /bin/mv $BKDIR.02 $BKDIR.03;fi
    if [ -d $BKDIR.01 ];then /bin/mv $BKDIR.01 $BKDIR.02;fi
    if [ -d $BKDIR ];then /bin/cp -la $BKDIR $BKDIR.01;fi
    /usr/bin/ssh [email protected] "/usr/bin/rsync -az -e ssh --delete --chmod=Du+r,Du+w,Du+x --exclude=/sys --exclude=/proc --exclude=/dev / [email protected]:$BKDIR/"
    if [ -f "$BKDIR/`/bin/ls $BKDIR|/bin/grep backup-date|/usr/bin/head -n1`" ];then /bin/rm -rf $BKDIR/backup-date*;fi
    /bin/echo `/bin/date` > $BKDIR/backup-date.`/bin/date +%Y.%m.%d.%H:%M`
    That works well using SSH public key pairs and an off site linux server to back the data up on. The rsync helps keep the amount of data that must be transferred down to a minimum, so that the incrementals are quick.

    You might also want to look into hedge backup:

    http://sourceforge.net/projects/hedge-backup/

    Its a decent script that can help automate an off site backup, and it uses encryption and compression. Just a few simple oldschool ideas to look at.
    Jonathan Kinney
    Data Systems Specialist
    Advantagecom Networks, Inc.
    http://www.simplywebhosting.com

  10. #10
    Join Date
    Mar 2009
    Location
    Chicago, IL
    Posts
    219
    Is there any reason you're not using the remote backups built into cPanel? They should be fine unless you happen to have any *massive* accounts.

  11. #11
    Join Date
    Dec 2008
    Location
    Florida
    Posts
    1,052
    Quote Originally Posted by SA-ChrisM View Post
    Is there any reason you're not using the remote backups built into cPanel? They should be fine unless you happen to have any *massive* accounts.
    Are you referring to:

    WHM > Backup > Configure Backup

    If so yes, I am, although I've read it only downloads account settings, not individual files.
    Not sure what to put here :-P

  12. #12
    Quote Originally Posted by mooseweb View Post
    Are you referring to:

    WHM > Backup > Configure Backup

    If so yes, I am, although I've read it only downloads account settings, not individual files.
    Um if you're running cPanel backups, under configure backups if you're running the latest version of cPanel, you can configure it to FTP the backups to another server.

  13. #13
    cPanel built in backups are really hard on cpu due to the gzipping. If you can swing it, go with R1soft, if not use rsync. I use rysnc to backup all the user/cpanel files and directories needed to restore a cPanel server after a crash.
    cPanel Hosting
    Site5.com - Best support in the hosting business!

  14. #14
    Join Date
    Dec 2008
    Location
    Florida
    Posts
    1,052
    Quote Originally Posted by AquariusADMIN View Post
    Um if you're running cPanel backups, under configure backups if you're running the latest version of cPanel, you can configure it to FTP the backups to another server.
    Thanks, I'll look into that.

    Quote Originally Posted by jphilipson View Post
    cPanel built in backups are really hard on cpu due to the gzipping. If you can swing it, go with R1soft, if not use rsync. I use rysnc to backup all the user/cpanel files and directories needed to restore a cPanel server after a crash.
    If I can't get the cPanel backups to work properly, I'll definitely look into rysnc and possibly R1Soft
    Not sure what to put here :-P

  15. #15
    Join Date
    Feb 2002
    Location
    New York, NY
    Posts
    4,612
    Quote Originally Posted by Jonathan Kinney View Post
    You can look into using rsync and cp -la to get a nice uncompressed incremental backup.
    Another option would be Rdiff-backup. It uses the Rsync protocol, but also keeps snapshots. The other method creates hard links, which puts a lot of I/O load on the backup server while it's running, among other complications.

    Quote Originally Posted by SA-ChrisM View Post
    Is there any reason you're not using the remote backups built into cPanel? They should be fine unless you happen to have any *massive* accounts.
    The FTP backups in cPanel may be convenient, but they use significantly more resources compared to Rsync. Considering that cPanel already has a local backup method that uses Rsync (to a local folder rather than a remote one), I'm not sure why they don't take a few minutes to allow the same exact commands to use a remote server. For daily backups, FTP backups can easily use 100-300 times more data transfer each month.
    Scott Burns, President
    BQ Internet Corporation
    Remote Rsync and FTP backup solutions
    *** http://www.bqbackup.com/ ***

  16. #16
    Join Date
    Aug 2004
    Location
    Houston, TX
    Posts
    1,396
    Quote Originally Posted by mooseweb View Post
    Thanks, I'll look into that.



    If I can't get the cPanel backups to work properly, I'll definitely look into rysnc and possibly R1Soft
    I would stay far away from R1Soft as possible, check there forum out. The product just does not work the way they advertise and they will not really support you when you need any help with it.
    Eleven2 Web Hosting - World-Wide Hosting, Done Right!
    Shared Hosting | Reseller Hosting | Dedicated | Virtual Premium Servers
    Server Locations in: Dallas | Los Angeles | Singapore | Amsterdam

  17. #17
    Join Date
    Mar 2009
    Location
    Chicago, IL
    Posts
    219
    Quote Originally Posted by Jonathan Kinney View Post
    You can look into using rsync and cp -la to get a nice uncompressed incremental backup. A simple example would be this:

    Code:
    #!/bin/bash
    ]
    BKDIR=/home/violentsheepmusic.org/rsync-backup
    
    if [ -d $BKDIR.14 ];then /bin/rm -rf $BKDIR.14;fi
    if [ -d $BKDIR.13 ];then /bin/mv $BKDIR.13 $BKDIR.14;fi
    if [ -d $BKDIR.12 ];then /bin/mv $BKDIR.12 $BKDIR.13;fi
    if [ -d $BKDIR.11 ];then /bin/mv $BKDIR.11 $BKDIR.12;fi
    if [ -d $BKDIR.10 ];then /bin/mv $BKDIR.10 $BKDIR.11;fi
    if [ -d $BKDIR.09 ];then /bin/mv $BKDIR.09 $BKDIR.10;fi
    if [ -d $BKDIR.08 ];then /bin/mv $BKDIR.08 $BKDIR.09;fi
    if [ -d $BKDIR.07 ];then /bin/mv $BKDIR.07 $BKDIR.08;fi
    if [ -d $BKDIR.06 ];then /bin/mv $BKDIR.06 $BKDIR.07;fi
    if [ -d $BKDIR.05 ];then /bin/mv $BKDIR.05 $BKDIR.06;fi
    if [ -d $BKDIR.04 ];then /bin/mv $BKDIR.04 $BKDIR.05;fi
    if [ -d $BKDIR.03 ];then /bin/mv $BKDIR.03 $BKDIR.04;fi
    if [ -d $BKDIR.02 ];then /bin/mv $BKDIR.02 $BKDIR.03;fi
    if [ -d $BKDIR.01 ];then /bin/mv $BKDIR.01 $BKDIR.02;fi
    if [ -d $BKDIR ];then /bin/cp -la $BKDIR $BKDIR.01;fi
    /usr/bin/ssh [email protected] "/usr/bin/rsync -az -e ssh --delete --chmod=Du+r,Du+w,Du+x --exclude=/sys --exclude=/proc --exclude=/dev / [email protected]:$BKDIR/"
    if [ -f "$BKDIR/`/bin/ls $BKDIR|/bin/grep backup-date|/usr/bin/head -n1`" ];then /bin/rm -rf $BKDIR/backup-date*;fi
    /bin/echo `/bin/date` > $BKDIR/backup-date.`/bin/date +%Y.%m.%d.%H:%M`
    As a side note, you might want to look into the --link-dest option for rsync. It saves quite a bit of space since you're not replicating un-changed files.

Similar Threads

  1. Backups
    By TonyB in forum Running a Web Hosting Business
    Replies: 18
    Last Post: 03-04-2007, 09:39 AM
  2. Backups
    By DjiXas in forum Dedicated Server
    Replies: 2
    Last Post: 01-21-2007, 11:53 AM
  3. Backups?
    By BigBlock in forum Dedicated Server
    Replies: 11
    Last Post: 01-28-2005, 02:42 AM
  4. how do you all do backups?
    By 6PS-Chris in forum Hosting Security and Technology
    Replies: 10
    Last Post: 04-04-2003, 02:14 PM
  5. Backups/Incremental Backups with WHM
    By noox in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 01-21-2003, 11:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •