backup uncompressed

merlinsilk

Verified User
Joined
Feb 16, 2009
Messages
32
I run my nightly backup out of DA and then rsync it over to another machine that could take over in case of the main machine fizzing out.
Problem is the compression of the backup files.
Even though there might be only small changes to some of the backup files, the compressed backup is very different to the last version in the eyes of rsync, so rsync has to pretty much copy everything even though there might be just some entries in the log files changed.
I'm pretty sure that rsync would have to transfer a lot less if I could have the backup files just as .tar instead of .tar.gz
Is there a way to tell DA-backup NOT to compress on backup?

Thanks,
Merlin
 
I do the backup as admin for all users.
Currently as a work-around I just gunzip all the files in /home/admin/admin_backups and then run the rsync, but it feels like such a waste of resources to first zip giga-bytes just to unzip them.
 
Hello,

The "domains" directory portion of the tar.gz is assembled on the fly... so the "uncompressed" version would be the original domains directory sitting where it came from, eg: /home/user/domains.

So, a simple solution would be to leave DA to compress the smaller data bits, and then have your rysnc setup transfer the user files, mainly the /home/user/domains directory.

You can flip off the bits you don't want to have backed up with this:
http://help.directadmin.com/item.php?id=335

specifically, shut off:
http://www.directadmin.com/features.php?id=960

and use rsync to transfer that part.

Then DA will still tar.gz the data normally.. which will let you then easily restore it without any ugly manual work...
And all you'd need to do is transfer the backed up domains directories over, and reset the ownership (if applicable)

You can also mix-n-match the features you want to exclude from the tar.gz with the above id=335 guide, and rsync where applicable.
1) the home.tar.gz can be large if /home/user/Maildir is oversized)
2) The imap data would also be something good to skip in the backup and use rsync (all user emails).

John
 
Thanks, John!

that is certainly a workable solution, and this might be the route I have to go.
So, in other words, there is no way to turn off the 'z' in the tar when creating the backup, yes? And, as I now learned, in restoring it, should tragedy happen?

Cheers,
Merlin
 
Hello,

Correct, the z is hard-coded.
This would be your closest option to changing it... but I'm not sure if it will be of any use in this case:
http://www.directadmin.com/features.php?id=792

I would say that having the standard DA tar.gz files, even with the skipped-items, a restore will be much easier. The tar.gz files will automatically re-create the user, with all of their settings, and with any data that you chose to leave in the tar.gz. Using rsync for the 'easy' data like /home/user/domains can be easily restored by copying the files back after the Users are created with the restore system.

John
 
"--use-compress-program cat" works in OS X but not in CentOS. I'm guessing we still need DirectAdmin to provide us an option for .tar only backups.
 
well but with a pre-restore-backup.sh script you should just gzip a file but this will be a lost of time...

Better would be if restore system check if is a .tar.gz or a .tar file and change the tar command line in the .tar file case removing just the z value, no?
 
Back
Top