Several people have asked me to elaborate on my backup scripts (now that I have them). Luckily, Mike Bombich (of Carbon Copy Cloner fame) has already written a fine tutorial on remote administration/backup of OS X using rsync.
While his examples are OS X-specific, the concepts are the same on any operating system that supports rsync and ssh. I used essentially the same procedure on my Windows laptop (running Cygwin), and of course the utilities are standard on any Linux or BSD system.
Only one thing to add: Mac OS X users who wish to back up Mac-specific files (those with both data and resource forks) should look into RsyncX, which not only supports resource forks, but also comes with a decent graphical interface for setting up backup scripts. My experience is that it should only be used in pure Mac environments; I tried to use it to back up documents from my Linux server to my iMac, and I ran into all sorts of problems as it was looking for resource forks that weren’t there.
I am working on further automating the process with rsync snapshots (backing up the backups). The idea is to keep several days worth of backups in case, say, the server is compromised and important files are deleted, or files get corrupted at some point and I don’t catch it immediately. More on that as I figure it out.
§
may want to look into Unison as well: http://www.cis.upenn.edu/~bcpierce/unison/
http://samba.anu.edu.au/rsync/examples.html
Top example uses rsync do do a full current and a 7 day incremental backup.
This is similar to what I use: http://gary.burd.info/content/news/25.html
With a good reference for the whole thing here: http://www.mikerubel.org/computers/rsync_snapshots/
The Rubel method (#3 above) is superior to rsync’s built-in method (#2 above) because the Rubel method gives you a complete sets of files for each snapshot.
I do not know how useful it is on mac or windows, but there is also rdiff-backup ( http://rdiff-backup.stanford.edu/ ). It does much of what you describe (may snapshots of reverse diffs) and it’s all python (well, except for librdiff).
Take a look into unison. It does a *fantastic* job of bidirectional syncronization. I only use it from unix-to-unix and unix-to-pc setups so I can’t comment on it’s Macintosh compatibility.
All I can say is that unison takes next to nothing to setup and run, has a friendly configuration file format and an extremely simple invocation mechanism.
Here’s a few more helpful links for us lame Windows users:
http://optics.ph.unimelb.edu.au/help/rsync/
and
http://rsync.samba.org/nt.html
I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)
§
© 2001–present Mark Pilgrim