Rsync user_backups

Conrad

Verified User
Joined
Aug 6, 2005
Messages
41
Location
Stolwijk
I like the user_backups can be restored. But i have the following problem, i hope anyone has done somithing similar.

The homedirs of some clients become very large so i want to backup the user_backups with rsync. But because the are tar.gz rsync gets every day the full tar.gz files.

is it possible to extract the user_backups (tar.gz), then rsync them from a remote server and on the remote server put the files back in the tar.gz file.

Would this be possible or has someone made a shell script that does this.
I don't know for sure if this wil work because the userbackups are again every day.

Someone any ideas ?

Conrad
 
You could quite easily write a bash script to do this.

I doubt anyone has made anything like this that they are willing to share as its probably unique to there own setup.


You could on the other hand write a script to rsync everyones homdir's and have
/home/user/*/user_backup in an exclude file for rsync, so it doesnt include the .tar.gz files.

You could also just rsync the tar.gz's but thats relying on the user to make backups , not the admin.
You could also do this vice versa.

Rsync is neat.
 
Last edited:
Hai h2d,

thanks for your reply.

at the moment i use te backup option of the reseller so i have a dir
user_backups with all tar.gz files of the users of this reseller.

But the benefit of rsync is to just have to sync just the changed files and not the entire tar.gz files of 15G. It may happen that only a 500 MB of the files has changed.

I could just rsync the home directories of the users and sveral config files of the server, but then the option of a easy restore from within DA is not possible
 
You don't need to do this at all. Think what you're trying to achieve.

You want the easy restore of a user_backup.tar.gz file, and also to have an off-site backup. So, if you continue to make the .tar.gz backups, you can restore anytime you like, no problem. If you want to delete all the user backups on the server to reduce disk space, you're not going to achieve much as a) you need to unpack them to copy them via rsync, and b) you need that much space to make the initial backups in the first place.


So, you want your off-site backups in case you lose your server. Now because the tar.gz contain an archive of various directories, all you need is a 'master' of the .tar.gz file, and then copy those directories via rsync every day. when the worst happens you can put the new rsynced files into the old tar.gz, copy it back to the server and restore using the DA user restore option. Easy.

Obviously, you'll need to rsync all the directories that exist in the tar.gz, and keep one copy of the user backup archive files.
 
So, you want your off-site backups in case you lose your server. Now because the tar.gz contain an archive of various directories, all you need is a 'master' of the .tar.gz file, and then copy those directories via rsync every day. when the worst happens you can put the new rsynced files into the old tar.gz, copy it back to the server and restore using the DA user restore option. Easy.

Obviously, you'll need to rsync all the directories that exist in the tar.gz, and keep one copy of the user backup archive files.

This is maybe the way to go. I just have to figure out which directories are in the user_backup exactly.
 
Back
Top