The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WHM Backups- rsync files then gzip

Discussion in 'General Discussion' started by msbfrnet, Mar 4, 2007.

  1. msbfrnet

    msbfrnet Guest

    I have a vps that is very short on disk space but has plenty of bandwidth. I have been using WHM to make daily backups and they rsync them to another server, but I really need to save the space the backups are using. I'm trying to find a way to rsync the files to another server first and then create the tar.gz archive to do a WHM restore. Alternatively I'd be happy with just a list of everything I'd need to make sure to backup to manually recreate an accout- cpanel config files, etc.

    Does anyone already do something like this? Or does anyone know what files I need besides just the accounts folder from /home? I'd appreciate any help.

    Charles
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    A cPanel forum user by the name beehave wrote a very good script to backup data which might help: http://forums.cpanel.net/showthread.php?t=58096
     
  3. ianmarie

    ianmarie Well-Known Member

    Joined:
    Mar 27, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    not sure about smarter backup script

    I also saw the post about the smarter backup script; but I don't think this addresses the questions that are being raised (as it still relies on the whm doing all the tar'ing and g'zipping work; and then transfering files over - albeit under less server strain than under normal operation)

    I'm in a bit of the same boat as the original poster; and wish to
    1. use rsync to make a daily backup of total files - which saves on both bandwidth and disk space as it only sync's changed files, rather than sending 'the whole lot' to the backup server everyday.
    2. I then want my remote backup server to do the work of tar / gzipping the files; in the same way that cpanel would - so that I effectively have a set of files that can easily be used for either transfering a customer to a new server; or for quickly restoring the server if there is a catastrophic hard drive failure

    Thus the original poster's question about knowing which files are backed up is the important one.

    Thanks
    any ideas?
     
  4. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    I don't think this is possible, because there is more involved in the cpanel backup process then just taring up a bunch of files in the /home folder.

    We have a similar problem, where we have a 20gb VPS that has a single cpanel account using 19gb of files. The cpanel backup can't run because the tar file can't be created since there isn't enough disk space.

    The "solution" was to get an account with www.bqbackup.com and just use rsynch every day.

    It isn't as nice as a "cpanel backup", but it's the closest we can get, I think.
     
  5. ianmarie

    ianmarie Well-Known Member

    Joined:
    Mar 27, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Space Minimisation!

    The issue - to try and minimise the amount of disk space used on a VPS, so that backups can be stored off the vps. SFTP / Rsync available to Backup.

    So - what if the cpanel backup routine was modified so that after each tar.gz was created, and before the next tar.gz file was created, it was rsync'd to the remote backup server, and then deleted. Thus any increase in disk space on the VPS would only be temporary, and minimal ie the size of one tar.gz file; thus only needing 'extra space' the size of the largest of the tar.gz files.

    Would this still be compatible with the export=rsyncable option (thus keeping bandwidth to a minimum); or would it mean that as the original tar.gz file has been deleted, that the entire new tar.gz's would have to be 'sent' - rather than only the current changed contents

    Has anyone else achieved something the same / similar via tweaking the cpanel backup routine?
     
Loading...

Share This Page