Once I have bought a MacBook and accumulated certain amount of information, I have realized that it may be a good idea to organize the backups. Not all the modern hard disks are as reliable as they used to be ;) And burning the DVDs is not a good idea, they are too small.

So, I have started searching for the solutions. First of all, the hardware. Since I wanted something inexpensive, the obvious choice was an external hard disk (I have other computers to backup, so I was planning to use the same disk for all of them). Getting a 500Gb HDD is not a big deal these days. As for the enclosure, there is a plenty of options. What I have learned is that:

  • If you get a USB (2.0 of course) drive you will be unable to boot the Mac from it. However, the USB enclosures are cheaper.
  • Firewire drive may be able to act as bootable disk for Mac (not all of them work).

I was planning to buy one of these things online but while walking through the local BestBuy I have noticed a 500Gb external disk (from some strange company called Diamond Digital) with USB interface priced very attractively. I have decided to try it. At the end, I had 14 days to bring it back :) First thing I did was to open it to make sure that there is something worthy inside and I was happy to see Seagate ST350063.

Drive worked fine so I have decided to create three partitions (exactly, the DOS partitions). I have 3 computers to backup: MacBook, Linux PC and a laptop running Windows Vista. And I wanted to be able to see the files copied from my Mac on my Linux system. As result, I ended up with 3 partitions: NTFS, HFS+ and EXT3 with journaling disabled.

So, finally, I have started looking for the backup solutions for Mac. I was surprised how many different solutions are available and…how the people are unhappy about them. Basically, I saw two kinds of solutions:

  • Backing up the entire disk and creating an image
  • Backing up only the files I am interested in and writing them "as is"

Since I had a USB driver and could not boot my Mac form it anyway, I have decided that I am not really interested in storing the disk image. My goals for the backup solution were following:

  • First of all, to same my personal file: Key Chain, photos, music collection, documents, source code etc. This was the primary requirement, whatever happened my files have to survive.
  • I absolutely wanted to have access to my Mac files from another machine, more precisely from the Linux box. If my Mac goes down I do not want to wait until I fix the problem (which as usually may take longer than expected).
  • The most important thing about any backup is that you should be able to access your files if something bad happens. I really did not want a tool that tells me two years later that "there is a problem reading the image".
  • I do not consider very important to be able to restore the Mac's disk from the backup. Most likely by the time my hard drive dies (I hope it does not happen too early) I will want to buy a bigger one. And probably by that time I will want to install newer version of the operating system. Worst case - I can always reinstall the system from the original DVD, with OS X it does not take too much time.
  • I wanted a free solution

After evaluating a couple of tools (including the ones available with OS X by default - "Disk Utility", "asr" and "hdiutil") I have finally decides that I should use the good old "rsync" and here are the reasons why:

  • It creates the copies of the files on the target drive. I can easily restore a subset of files, I can manually copy any of them if needed, I can access them on another computer without any special software.
  • It is very flexible, I can make quick backups of my home directory in almost no time using the same target directory tree.
  • The version shipped with recent OS X supports all the extended attributes including the resource forks
  • RSync is good at making incremental backups, it has the configuration options allowing me, for example, to keep the files on the backup device even if I delete them from my source disk (i.e. I can delete something by mistake, make a backup and my backup copy of the file will survive)
  • It is free and I already knew how to use it

Here is the script I am using to make a backup: backup_all.sh. It uses the file backup_excludes.txt as exclude list. It may need to be customized for your system. I run this script once in a while when I connect my external drive to my MacBook.

You need to change the values of "BACKUP_DEST" (your backup pathname) and "EXCLUDES_FILE" if you put it somewhere else but /usr/local/bin. You can make it less chatty by commenting out "VERBOSITY". You can try it without doing the actual backup by uncommenting "DRY_RUN".




blog comments powered by Disqus

Published

23 July 2007

Tags