Friday, January 23, 2009

Don't Feed the Time Machine

Most technology issues are very simple. It's all about the grinding noises. If you hear grinding noises because your hard drive is busy all the time, that's bad. SSDs = less grinding noises. Client/server = the grinding noises happen mostly in a server room, not your office. Cloud computing = the server room with all the grinding noises is even farther away, probably near a river with a waterfall to mask the noise even more.

OS X Leopard's Time Machine feature is great... with the exception of the frequent grinding noises. Wake up from a long sleep -- Time Machine does a backup, might as well go for a coffee break. Right around the time you want to check mail, listen to music, work on that critical document -- the hour between backups expires, more grinding noises that slow down the machine and kill your concentration. Something like Time Capsule, doing the backup to a wireless network drive, is really just a way to transfer the grinding noises to another room.

But if you just have a regular computer + hard drive setup with Time Machine, don't despair.

The first way to lessen the noise is to set Time Machine preferences to exclude folders with frequent activity, big files or lots of files, and unimportant data. Open System Preferences and go into the Time Machine pane, or pick "Open Time Machine Preferences" from the icon in the status bar at the top-right part of the screen. This preference pane has a little + icon where you can select folders. Making a selection means that folder, and everything underneath it, is left out of the Time Machine backups.

For example, I leave out my iTunes Music folder because I back up changes there on my own schedule. No point in spending time every hour backing up songs where I fixed a typo in the album name. I'll do a big backup once a month to take care of that. Similarly, I have a central download directory, but what I want to back up are the applications that I actually install, so I'll leave out the download directory with its original .dmg and .zip files. And if you do programming, you might want to exclude certain directories based on your style of work. If you keep everything up-to-date using CVS, you might exclude your source directories and just make sure the CVS repository is included in Time Machine. If you generate all kinds of binary files, PDF documents, or what have you over and over again, stash them all in destination directories that are excluded from Time Machine backups.

Another technique that achieves the same result is to put certain folders on another drive, and refer to them using symbolic links. (Just make sure that external drive is excluded from Time Machine backups, using the preferences pane as above.) In Terminal, you'll use a command like "ln -s /volumes/Other_Drive/Some_Folder /users/Me/Some_Folder". (Like with the 'cp' command, the first argument is the item that already exists, and the second is the new one you're creating.) You'll be able to do all the normal operations with the folder like it existed in your home directory, but Time Machine will know that it's really on the other hard drive, and will include/exclude it based on the preference settings for that drive. For example, I recently used this technique with a big "Podcasts" directory; I freed up the space on my internal drive, and took those files out of the Time Machine backups all in one step.

If after going through these exercises you still hear a lot of grinding every hour, you'll need to track down folders that applications are updating without your knowledge. Those files might not be worth backing up. The command (again, from Terminal) to run is:

find ~ -mmin -60

That will display a list of files that were updated within the last 60 minutes. On my system, this technique pointed out folders such as ~/Library/Caches, ~/Library/Cookies, and ~/Library/Safari that were being updated constantly based on normal web browsing activity. The information there is the kind of stuff I clear out periodically anyway to keep the browser running fast, and if I had a system crash it wouldn't be high on my list of things to recover, so it's back to Time Machine preferences for a few new items to exclude.

No comments: