Backups in OSX

Feb 03, 2006 19:17

If you have a mac, you have no excuse to not keep backups because it is cheap, fast, and incredibly easy.
  1. Go to the computer store of your choice and buy an external hard drive at least as big as the one in your system.
  2. Open /Applications/Utilities/Disk Utility.app
  3. Using Disk Utility, format the external hard drive HFS+ and name it "External".
  4. Using Disk Utility, create a "New Image" on the external drive called "backup".
    • Size: Custom (type in the size of the drive you're backing up)
    • Encryption: none (unless you are paranoid)
    • Format: sparse disk image
  5. Open /Applications/Utilities/Terminal.app and run this command:
    sudo rsync -avE --delete ~ /Volumes/backup
  6. When it is complete, unmount the Backup disk image.
  7. Congratulate yourself on your responsible approach to data management

That's the hard part and you only have to do it once. Now every time you need to back up your mac you do this:
  1. Plug in your external drive.
  2. Double-click the "backup.sparseimage" file to mount it.
  3. Open /Applications/Utilities/Terminal.app and run this command:
    sudo rsync -avE --delete ~ /Volumes/backup
  4. When it is complete, check your backup data. If you've got 30GB of files on your drive make sure you've got 30GB of files on your backup volume. Make sure that they're the right files. Make sure they've got the timestamps that you expect.
  5. unmount the backup disk image, unmount and power off your external drive.
  6. Congratulate yourself on your responsible approach to data management

Rsync is an old but very useful program that only copies the files which have changed since your last backup. The first backup will take a very long time but later backups will only take a few minutes.

This tip has been brought to you by the letter "E", as in "the nonstandard rsync flag that also copies the resource forks and keeps your data from going inexplicably bad."

Update: Due to a memory-eating bug in disk images I'm not using disk images right now: I'm backing up my files directly to the firewire drive filesystem rather than to a disk image on the firewire drive. To do this, skip steps 1-4 in the initial setup and just run:

mkdir /Volumes//backup
sudo rsync -avE --delete ~ /Volumes//backup

backup, osx

Previous post Next post
Up