Bed's Stuff

Tue 19 August 2008


Posted by bed in Tech Talk   

Before becoming a Mac-convert, my backup procedure was almost non-existent. Every six to twelve months I would burn a CD or DVD with my most important stuff on it. I've been rather lucky that I've never had a hard-drive failure - its happened to most people I know at least once.

After turning to the Apple-Dark-Side they made it too easy. To not do a backup really required effort. Stick a USB drive in, turn on Time Machine... and you have a regular automatic backup procedure.

Of course I didn't want to backup to USB drive. I have my and K's stuff to backup, and an Ubuntu file server with a nice 400GB drive to hold the files (lets not discuss off-site backups, move along...). Now while Time Machine supports backing up to a network drive, they limit it to Apple's own products, or a drive hosted by Mac OSX 10.5. Capitalistic goals aside, there is a very good reason for this. Apple added some extensions to AFP to safely handle network dropouts during the backup process. These extensions are required to safely protect your backups from becoming corrupted.

Now if you are pretty confident that your network isn't going to drop out during a backup, you can configure Time Machine to allow an unsupported network drive, and backup to your SMB shared network drive. Easy. So thats what I did.

This has worked flawlessly with K's iMac. My MacBookPro however, was more complicated. Because its a laptop, I often run on wireless when I'm downstairs in-front of the tv. When I go upstairs, I'll plug in the Ethernet for optimal speed and turn off wireless. Of course I never paid attention to see if Time Machine was currently working when I did this. It was often running and every so often I would corrupt my backup sparseBundle and had to start all over again.

So I finally gave up on Time Machine for my laptop. I still wanted the automated backup however - but I don't care about incremental backups, I've never (famous last words maybe...) wanted to go back to a previous version of a file. I just care that the current version is backed up in-case my drive dies.

This is where I love that the best computer UI is built on-top of the best OS core... unix. A simple installation of rsync on my Ubuntu file server, a simple shell script on my laptop (rsync is installed by default with Leopard) and I'm mirroring the folders I want. Then a simple configuration of my system to wake up at 3am and run my script and I'm automated. Too easy.