Montag Okt 23, 2006

Using rsync to do quick backups

Ok, I've known of rsync for a long time, but only today did I realise that it is absolutely straightforward and requires no setup whatsoever to use it for quick and dirty backups. Imagine you have an ssh accessable shell account on a server (with a good RAID or SAN/NAS) and rsync installed on that server. Assume as well you have rsync locally. Now you have a local directory mywork that you want to backup into a directory on the server called mybackups - easy: Just run this:
rsync -avrz --rsh=ssh ~/mywork server:mybackups
which will create the mybackups dir in your homedirectory on the server and create a directory mywork underneath that that is identical to your local copy. Now after you make some changes to your local copy just run that same command again and you'll have an identical copy on the server again. Simple! I'm sure there is more sophisticated stuff you can do but it does the trick to start with.

Kommentare:

Senden Sie einen Kommentar:
Kommentare sind ausgeschaltet.