Disable OS X Time Machine's Continuous Local Snapshot Backups

I recently emerged from a hard drive failure with minimal loss of data: between Git-mirrored project files and Apple’s built-in Time Machine backups and a little bit of luck (only a couple of hours had passed between my last Time Machine backup and the crash), almost everything was saved and restored. With the new system, I moved to OS X Lion 10.7. While for a long time now my plan has been to move to cloud-based backup (such as SpiderOak or CrashPlan), I decided to stick with Time Machine for now. However, the implementation of Time Machine in Lion has one new “feature” that I find extremely annoying: “local snapshots”. Basically, with this, Time Machine takes backups of your system every hour, even if your backup drive is not connected. These backups are made on your local drive, and are synced to the backup drive the next time you plug it in. I suppose this might be useful to people who do not (extensively) use version-control to manage their work. For them, “backup” means “preserve the current version of everything I’ve got so that I can go back to it later”. I, however, have almost all my work under Git, with the local repositories mirrored in at least two other physical locations. I use the Time Machine as a convenient one-stop rescue restore solution (as opposed to the hassle of rebuilding all my local binaries, checking out the repositories one-by-one, etc. etc.), as well as the main back up for data not under version control (e.g., my e-mail and photographs). Because I explicitly take ownership of my own version-control (and I would not have it any other way), my Time Machine backups are for physical redundancy purposes, i.e., recovery in the event of hardware failure. Therefore, continuous local snapshots to the [local] hard drive are a waste of space and CPU time as for as I am concerned: a hard drive crash is going to take everything down anyway. (In contrast, what is useful is if the continuous snapshot backups were made to the cloud, or, as happens with Time Machine when a backup disk is actually plugged in, to a separate physical device) . As such, I do not need, nor care for, Time Machine’s continuous local snapshot backups (with “local” referring to the local drive). But I would not have cared particularly if this was how Apple wanted to do it iff it were not for the fact that these local snapshots were taking up horrible amounts of processing power. Next time your computer gets sluggish, check your running processes (”top”, “ps aux” …. or, alternatively, for all you GUI fans, the ActivityMonitor). You might see “mdworker”, but that’s an old and well-known periodic background CPU hog- the Spotlight index engine. But you might also see “mtmd”. This is Time Machine’s local backup engine. After some of my gcc builds stalled for the millionth time, I decided enough was enough, and went about trying to see how to disable the local snapshot “feature”. Surprisingly, the option to do so was not built in as part of the Time Machine’s standard GUI interface. But fortunately you can do so via the command-line. This is what I do love about Apple. No matter how much the GUI parts of their operating system tends toward the fancy-schmancy “don’t-worry-your-pretty-little-head-over-that-and-just-let-us-do-your-thinking-for-you“ philosophy, they almost always allow for tinkering, modification and control via the UNIX side of things. And for a command-line ex-Linux geek like me, that’s all I ask for. So, here is how you disable Time Machine from stealing your CPU’s when you are not looking and taking local snapshots:

$ sudo tmutil disablelocal

Voila! You have just taken ownership (and responsibility) for your backups! And that’s the way things should be.

Share