Yet another backup script solution

Jun 07, '06 07:30:00AM

Contributed by: spar

There are a few examples of backup schemes on MacOSXHints. In the spirit of giving something back, I thought I would share my backup scripts.

I back up all my user files to an external hard disk using RsyncX. You need to download and install this first. The advantage of this is that you syncronise between the data on your hard disk and the data on your external backup disk, so each time the script runs, you only copy accross any changed files. When I say "all my user files," I mean that I syncronise a copy of all directories under /Users

Copy this SyncUsers script to /usr/bin on your Mac (here's an executable version). The volume to back up to is represented by the variable EXTDISK in the backup script. In my case, DataFormac. Change this to the volume name you want to backup to. The script should be executed via sudo to insure that all users can be archived, and so that mdutil works. To run the script, just type sudo SyncUsers in a terminal window.

I've worked in the computer industry a while, and have seen a few disasters. Because of this, I'm overly cautious. Every month I take a copy of my external FireWire backup disk to another disk and store it "offsite" (which in fact means in my desk at work!). This is done with a second script called Offsite (here's the executable version).

Copy the script to /usr/bin on your Mac and then again you need to change the name of some disk volumes in the script. The disk that the script copies from (the volume you run SyncUsers to) is stored in the SYNCDISK variable. The disk volume that you will copy to is in the variable EXTDISK. Now be aware, the script will erase the volume (EXTDISK) and then take a copy of your backup volume using ditto. Again, this script should be run using sudo.

[robg adds: I haven't tested these scripts.]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060603220033277