Time Machine and rsync
| Gabriel |
I think Time Machine is one of the best features of Leopard / Snow Leopard, but I still have a few issues with it.
First, I’m really not interested in having a Spotlight index of my Time Machine drive, so I go to System Preferences / Spotlight / Privacy and add my Time Machine volume to the “do not index” list. This isn’t so much a privacy issue as a performance issue since the Spotlight indexer (“mdworker”) is a real hog so why have it index stuff you don’t plan to search?
Second, Time Machine doesn’t work well with more than one backup volume, especially if you want to update one of the backups infrequently or backup different directories to each drive. In my case I have a large drive that I keep at work and a small backup drive that I keep at home in case my office burns down and destroys both my mac and the big backup drive. To use Time Machine for both disks, I would not only need to “select disk” but also “exclude items” because the disk I keep at home isn’t big enough to hold everything. Furthermore if I skip a few weeks of backing up to the home disk, Time Machine refuses to do an incremental backup.
My solution to this is to use Time Machine for the main backup drive and rsync for the second one. Every day I use Time Machine with my big backup drive at the office. Once a week or so at home I take my redundant backup drive (“seagate”) out of the drawer, plug it in, and run this shell script.
#!/bin/bash #backup_seagate.sh rsync -aE --delete ~/Documents/ /Volumes/seagate/rossman/Documents rsync -aE --delete ~/Library/ /Volumes/seagate/rossman/Library rsync -aE --delete ~/scripts/ /Volumes/seagate/rossman/scripts rsync -aE --delete ~/Pictures/ /Volumes/seagate/rossman/Pictures rsync -aE --delete ~/Music/ /Volumes/seagate/rossman/Music rsync -aE --delete ~/Applications/ /Volumes/seagate/rossman/Applications
Note that the version of rsync that ships with OS 10.5 or 10.6 is pretty old. If you install the current version, it will handle the resource fork more efficiently. There are instructions here but for my purposes it’s not worth the hassle.
[Update1: USB flash drives work well as your off-site backup because they are easier to transport than hard drives, being smaller and lacking moving parts. However you’ll need to use Disk Utility to change the file system from FAT to HFS+].
[Update2: Be careful with rsync as the syntax is important. It needs to be “command options source target,” if you reverse source and target you’re pretty much screwed].