We have Leopard Server running in our small software company, with user’s machines backed up to the server via Time Machine, and other important data stored on the server such as our intranet pages. So it is vital that we make backups of this server. That’s the easy bit – we can use Time Machine on the server itself, saving to an external drive, so that all changes are saved each hour, and Time Machine can restore files when required.
However, it is also important that we have offsite backups – in case the building catches fire, or the backup hard drive dies. This is where a rotating set of external hard drives would come in useful.
The Challenge
Time Machine easily backs up to an external USB or Firewire drive. The challenge is that Time Machine can only back up to a single drive. We could eject the drive, then plug in another, but Time Machine is still looking for the first drive so we’d have to manually change Time Machine settings to backup to this second drive. And then when we swap again, we’d have to do this all over again. That is too much work.
The Solution
Here is the solution I came up with. I’ll explain what I did first, then the limitations of this solution.
I started with the following: two 1TB external firewire 800 drives. The drives we bought were the Lacie 1TB Big Disk Extreme +.
I plugged the first drive in to the Mac Pro we are using (running Leopard Server). I changed its volume name to “Backup” and set it up as a Time Machine backup drive. I let Leopard Server do an initial backup.
Next I started the Terminal application, and from the command line looked at the contents of the backup drive, via “ls -a /Volumes/Backup“. The results were as follows:

Your drive will have a different number file name than the .001f5b310098 our drive has.
I copied this .001f5b310098 file to a temporary directory, and plugged in the other 1TB drive. When mounted, I changed its name to Backup, and created a directory structure to match the one on the first drive. I also copied the .001f5b310098 file over to this new drive.
Now I ejected both drives, and plugged in the second. Leopard assumed it was the same drive as the first, and used it for Time Machine backups. I ejected that drive, plugged in the first, and once again, Leopard assumed it was the same drive, and performed a Time Machine backup.
So basically, we now had rotating disks working with Time Machine. I could eject the drive each week, take it off site, and replace it with the other drive, then swap them again the following week.
Hot Swap
The trouble with the system so far is that I need to go to the machine and manually eject the backup drive each week, then plug the other drive in. That means I need to either ssh in, remote desktop in, or go to the machine itself in the server room and have a screen connected to it at all times. This is a server machine – I really want hot swappable drives.
The Lacie drives we bought have a shortcut button – a button you can push and usually (by default) it runs EMC Retrospect. I didn’t want to use EMC Retrospect, but I installed the software anyway as I had an idea. Not quite “hot swappable” drives, but close enough that I don’t need to have a keyboard or screen attached to swap the drives.
I created an AppleScript that the Lacie Shortcut software would run on pressing the shortcut button the drive, and installed it following the instructions that came with the drive (basically there is a system preference to do this once you install the software). The idea of the script is to eject the drive when I push the button, so that I can safely remove it and plug in the next drive in rotation.
But I wanted a bit more. First, I need to know it ejected it without issue, but I don’t want to have a monitor attached. So I made the script talk – telling me if there was an error, or if it ejected the drive without incident.
Second, most of the time the machine has the volume off. So I wanted it to increase the volume for the voice, then go back to the original volume – so we don’t hear beeps etc. when someone logs in remotely to the machine.
Third, if I made a mistake about ejecting the drive, I wanted a push of the button to remount the drive.
So, the following is the script I came up with. You can download the script here.

The result
So now, at the start of each week I can enter the office, go to the server, press the shortcut button, wait for the voice to say “Backup is now ejected”, safely remove the drive, then take the second drive, and plug it in. Leopard assumes it is the same drive, and continues doing incremental backups. The first drive now is taken away and is the offsite backup.
Limitations
There are some limitations to this solution.
First, anything backed up in the previous week will be on the offsite drive. The onsite drive will have a backup from that morning, and from one week ago, but any changes during the previous week are on the other drive. So, if someone needs a file from last week, you have to go and get it off the offsite drive.
For us, this isn’t as big an issue as it sounds. Most of the backups that people need access to are backups of personal files on their own machine, and those backups are stored within a backup store on the server. So they remain on the machine regardless of the backup drive. The “missing week” is only an issue for files that were changed on the server. So far that hasn’t been an issue for us, but depending on the way your company works, it could be a show stopper.
The second limitation is with Time Machine itself. Time Machine doesn’t backup an entire server so you can boot from the backup, or restore an entire system from the backup. If your system is completely hosed, you need to reinstall the operating system, then manually put all your files off the Time Machine backup back on to your server.
Conclusions
It all depends on what you want from your backups. This isn’t the ideal backup, but it is a convenient and easy to set up backup system with rotating disks. It also has great ease of use when it comes to restoring files, given the Time Machine interface. One thing you might like to consider is using some third party software to make an occasional full system backup to another drive that you can use for rebuild if disaster strikes. If you have other ideas, please add them to the comments.


Nice of you to share, but this is probably of limited use to the general pubic (sic).
What we’re all waiting for is your review of iDrum for the iPhone. Bring it on Beat Boy!
Comment by w910iROOLS — August 25, 2008 @ 9:01 am