WHM Backups- rsync files then gzip

M

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
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN

ianmarie

Well-Known Member
Mar 27, 2006
56
0
156
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?
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
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.
 

ianmarie

Well-Known Member
Mar 27, 2006
56
0
156
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?