July 11th, 2005, 12:02 PM #1
[How To] Script RsyncX for Backup To and Recovery From a Server
Last year I began implementing Mac OS X 10.3 at the company where I work. One of the issues I had to tackle was backup of client systems to a central server. I tried several off-the-shelf products but none of them were quite right. Some required the administrator to be logged in and run the backup from a GUI. I didn't have time for that. Some wouldn't back up to a server at all, or did it in a really strange way. In the end, I decided that the best solution for me was RsyncX.
I uncovered a lot of little nagging problems on the way, but over a period of time made what I felt was significant progress. The end result of my work was a script that automates the backup of a desktop Mac to a Mac server, both of which are running RsyncX. The server runs RsyncX in daemon mode, waiting for connections from desktop/client Macs. The desktop runs the script to "push" files to the server each night through a "cron" job.
The overall package includes filtering out of files you don't need to backup and files that maybe you don't want to backup. The companion script that restores the backup from the server can generate a bootable system from the RsyncX backup.
On my web site I'm sharing the source code for the script and a more detailed description of what I did and why. I don't claim this will work for everyone (or "anyone" for that matter) but if you're trying to come up with a viable desktop-to-server backup for OS X Macs, you may find the notes helpful and the scripts at least a good starting point.
The script and procedure for backup using RsyncX is here:
The script for restoring the system from a backup made above is here:
These scripts assume a "more than novice" level of shell scripting and Rsync knowledge, though you shouldn't have to be an expert to make sense of them. As with any freebie, these are "use at your own risk".