Optimal backup to swappable Hard Drive with rsync on OSX

backupmac-osxrsync

This is close to other questions, but I'm having trouble narrowing down the 'optimal' solution for my use case, if there is one. AFAIK this is not a dupe because OSX has different options relevant for its particular flavor of hard drive format. This is also a laptop use case, so I'm looking for solutions that are relatively quick, and they probably can't run on a cron (in case I forget to plug the external drive in before bed).

Here's what I'm using:

  • using OSX snow leopard 10.6.7
  • rsync version 3.0.7 protocol version 30
  • backup to laptop hd in external enclosure
  • one partition only

Here's what I want to be able to do:

  • shut down my laptop
  • take the disk out of the external enclosure and put it into my laptop
  • run laptop

So, this is not a true backup system per se — deleted files remain unrecoverable, just an insurance policy against hd failure. Note that I should not have to reinstall any applications or operating systems.

Here's what I'm doing now:

sudo rsync -aNHAXx --fileflags --protect-decmpfs --force-change --progress / /Volumes/EXTERNAL/ 

I have yet to test this. (So first question, you think this will work?)

My question is, what can I do to improve on what I'm doing in this command line (other than putting it in a script)? What am I not considering?

Thoughts I have:

  • am I really preserving everything I will need
  • what can I exclude? — spotlight files? caches?

(Inspired by codinghorror What's Your Backup Strategy? post which is now dated.)

Best Answer

My rsync script for a periodic disk clone to a disk mounted at /Volumes/Backup1 is:

sudo rsync -xrlptgoEv --progress --delete / /Volumes/Backup1/

(optional) sudo bless -folder /Volumes/Backup1/System/Library/CoreServices

That's a full bootable clone of the drive.

A few points:

You don't necessarily need to install the backup drive into your laptop. I don't see any reason you wouldn't be able to boot directly from the disk while it's in its USB or Firewire enclosure. (Hold Option at boot to select the boot disk)

Some utilities like Carbon Copy Cloner do this just as well and provide a cleaner interface.

Related Topic