Falling Leaves: the Ardes blog

Archives filed under "time machine"

Slimming Time Machine Backups, Redux

Ray Drainville

I’ve written before about slimming Time Machine backups. Without careful pruning of the system, developers can find that their Time Machine backups become huge. For instance, if you’re developing Rails apps, you’ll likely want to not back up your logs directories. And everyone will probably want to exclude up their Cache directories, which of course are scattered throughout the system: I’ve counted /Library/Caches/, /System/Library/Caches/, and ~/Library/Caches/; and this doesn’t cover specialised caches you can find in */Library/Application Support/, for instance, for Flash. Remember this location, and note the asterisk: these become important later.

Well, since I’ve slimmed my Time Machine backups, I’ve noticed the occasional baffling 450MB or so backup in the morning, and periodically throughout the day. I couldn’t figure out what it was—remember, Apple doesn’t let you know what you’re backing up—and I was really worried that someone had broken into my machine and was using it to relay something really unsavoury.

Enter Time Tracker by Charlesoft, the author of Pacifist (I’ve since discovered BackupLoupe, which does much the same thing). Time Tracker is a very basic app that lets you view what, specifically, has been backed up, and how big it is. It’s a big help, and it helped me identify the culprit: Roxio’s Retrospect, which I use to create monthly backups of my work.

It turns out that even if you aren’t using it to back up your entire system, Retrospect creates a huge tally of your work. It’s located in /Library/Application Support/Retrospect/ and for me at least the files there tally usually in the region of 400–600MB in size. Which is backed up periodically throughout the day by Time Machine. Yes, the backups are backing up the backups. It’s backups all the way down, people.

So, uh, if you’re paranoid like me & use Retrospect for monthly backups (because, you know, hourly backups aren’t enough), then you’ll want to exclude this from your backups. Since then, my backups are a lot saner in size, and my backup drive is no longer filling up with alarming speed.

Web Design: A Look Back

Ray Drainville

Serge Keller has compiled a series of screenshots of early websites. How far have we come?

Alta Vista in 1996 wasn’t a million miles away from Google today. Visually speaking, that is. Apple in 1997, however, shows how much things have changed:

It’s been a while since I’ve seen this. I think it interesting the lack of change for “harder” information gleaning, à la Alta Vista & Google. Only recently has Google been modifying its look. Information services is clearly a very conservative field.

OS X Developer Tip: Slim Time Machine Backups

Ray Drainville

If you’re using Mac OS X and you’re a developer and you’re too busy working to think about backing up your work, then Time Machine is fantastic & a lifesaver. Time Machine will automatically back up your work on an hourly basis. Coupled with a Time Capsule—which provides both the storage for those backups and your wireless connection—backing up is seamless, which is as it should be: if it isn’t seamless, you’re not going to back up nearly as often as you should.

However, Time Machine is not without its faults. I found it frustrating to set up initially, as I was setting up individual accounts (with passwords) & the setup for this is not clearly laid out. Worse, however, is that you can’t set up default rules—like ignore any directory named logs (those developing in Rails will know the files in logs can get huge), although you can set directories (or files) to be ignored manually.

Worst is the lack of any idea of what Time Machine is backing up. When you’re a developer, this can be very frustrating, as periodically you’ll find that you’re suddenly backing up gigabytes of data without knowing why. This is bad: when Time Machine runs out of space, it removes the oldest backups, so you can’t go “back in time” as far as you may need to. For instance, my last backup is 4 October when it should be something back in June, when I first bought the Time Capsule. Something was eating up space.

You could adopt a Zen attitude to this: let it do its thing, accept this state of affairs & doubtless you’ll be happier—until your Time Capsule is filled, that is. Or, you could be obsessive-compulsive & make yourself miserable trying to figure out wtf is going on. TimeDog helps you see something of what’s been backed up, but I found it unhelpful as it wasn’t letting me know about the latest backups—in my case at least, it only appears to give you information about the initial backup. Well, that’s not helpful.

Last night, however, the right chain of events occurred that provided the solution—for web developers, at least. I was performing a MySQL sync for one of my clients—in this instance, I also sync the database locally so I can check my work against the client’s actual data. Time Machine started up just after I started syncing locally. At first it was backing up about 2.5MB. Suddenly, however, it was backing up over 2GB worth of files. Strange, I thought—I had excluded the db folder on the Rails project, so the synced YML files shouldn’t be backing up.

And then it hit me: Time Machine was backing up the actual updated MySQL databases. Obvious, really, when you think about it. For Mac developers, your MySQL databases will be in one of two places:

  • If you’re using the default OS X setup, /var/db/mysql;
  • If you’re using MacPorts, /opt/local/var/db/mysql.

All you have to do to remove these from backups is to go to Time Machine preferences, click “Options…” & exclude the above directories.

You may want to prune more selectively, however: for me, the db sync only really affects one particular client. You can go into the mysql directory & merely prune out the database that’s filling up your Time Machine. Please note that this database won’t be backed up, however—you may want to back it up manually at specific intervals.