Saturday, October 31, 2009

iMac Repair Post #2 -- the Backup Regimen

We're taking a brief break from the chronicle of how our iMac got its new hard drive to describe our backup regimen. Here's what I want my backup strategy to accomplish:
  • Survive the failure of any single hard drive.
  • Be able to restore all our documents, especially media files (music, photos, videos).
  • I'm not interested in restoring my system files, as I prefer to re-install the operating system over restoring a whole system backup. This recovery takes more time but results in (even on a Mac, and especially true on a Windows machine) leaner, speedier, and more stable machine.

The Main Ingredients
The two main ingredients to our backup strategy are Mac OS X's built-in Time Machine feature and a HP MediaSmart EX 485. But alas, as simple as Time Machine is, backup is a little more complicated than just hooking the two up and turning Time Machine on -- mostly because we also have to take into consideration how our media applications (primarily iTunes, iPhoto, but include a host of other less commonly used applications for accessing our music, photos and video) need to use the files.


















For all our documents except for our media files -- music, photos, and videos -- it is actually just plug and play. The HP MediaSmart comes with software that makes it look like a Time Machine disk. To set this up:
  • Plug the iMac and the MediaSmart into the same switch (in our case, a Linksys WRT54G)
  • Install the HP MediaSmart software on the Mac
  • Login to the HP MediaSmart Server Control Panel using the MediaSmart's admin username/password (same credentials you use to manage the server itself)
  • Decide how much space you want to set aside for Time Machine backup (we're using 500GB).
Once you've down this, fire up Time Machine and select the 500GB disk named "Backup to HP MediaSmart Server" as your Time Machine backup disk.
Note: I've heard plenty of horror stories from folks trying to use generic SMB volumes for Time Machine backups. Do so at your own peril, and read up on best practices before you go down that treacherous path.



In the Time Machine Options... window, I've chosen a few directories not to backup:
  • The Backup to HP MediaSmart Server disk itself
  • The external hard drive containing my virtual machines and photos -- more on this later
  • System Files and Applications
Time Machine then goes to work, automatically and continuously backing up all our documents, applications, application settings, and local mail directories.

For our media files, here's what we do:

Music files live on the HP MediaSmart server, managed by iTunes.
  • I let iTunes manage the contents of the directory, so there's a folder called iTunes inside the Music directory, and iTunes is mostly ok with pointing to that directory -- provided you make that volume available automatically when you login. Use System Preferences | Accounts to make that happen.
  • I let the HP MediaSmart automatically backup the contents of the Music folder to multiple hard drives automatically.
  • Finally, I sync the entire contents of my Music library to my 80GB hard-drive based iPod once in a while.
  • This means our music library lives on at least 3 hard drives: two inside the HP MediaSmart server, and one in the iPod.
  • Since the audio files live on the HP MediaSmart server, most any client can access the music -- our Tivo, other PCs and Macs (via iTunes or Windows Media Player), my iPhone (via HP's iPhone app), and authorized folks on the Web (via HP's Flash-based streaming app).
Photos and videos live on an external hard drive, managed mostly by iPhoto, and which I manually sync to the HP MediaSmart
  • I have a Photos directory on an external Firewire 800 hard drive.
  • The iPhoto library lives on this external drive.
  • We currently have >250GB of photos and videos.
  • We use an external drive for performance reasons. iTunes is ok with files living on a slow-to-access network drive, but I doubt iPhoto and iMovie would be ok.
  • After loading new photos with iPhoto, I sync the files to my HP MediaSmart from the Terminal:
rsync -avnr --progress /Volumes/MyExternalDisk/Photos/iPhoto\ Library/ /Volumes/Photos/iPhoto\ Library/
  • In the above -- MyExternalDisk is the name of my external drive; Photos is the name of the folder the HP MediaSmart exports to the iMac.
  • As with Music files, I let the HP MediaSmart duplicate all photos in this directory to multiple internal hard drives.
  • So our photos are also on 3 hard drives: the external drive connected to the iMac and 2 drives inside the HP MediaSmart server.
  • In addition to this backup, I usually upload photos to Smugmug, where we have an unlimited account which lets us upload anything we want. But we didn't start using Smugmug until about 2.5 years ago, so the archive there is incomplete.
I'm told the new HP MediaSmart servers will do a better job of automatically scooping up media files, even when they live on a Mac. Hopefully folks like me who own the EX485 will get that improved media syncing next year.

Next up: because we don't backup our system files, restoring the OS and applications requires a bit of manual work which I'll describe in the next post. Is it worth the manual tweaking? I think so.

Even on a Mac, systems accumulate crud over time, and a fresh install gets your system back to its factory-fresh -- read: speedy -- state. A factory fresh install of Snow Leopard feels snappier than one that started as 10.4.x and eventually made its way to 10.6.x. This is of course even more true for Windows machines, which I'll routinely rebuild every 6-12 months as a matter of system maintenance completely independent of backup needs. We'll see if Windows 7 makes this unnecessary, but, as one of the new Mac ads point out, this seems unlikely:



2 comments:

S Yuan Hunter said...

I just love those ads!

Christine Szeto said...

Finally read through (and APPLIED your backup regimen). Thanks for the detailed tutorial!