April 8, 2007 at 11:00 AM by Dr. Drang
Despite my preference for command-line tools--especially for doing scheduled tasks--I recently bought a copy of SuperDuper! for making backups. I’ll give the reasons for switching to it later in the post, but I thought I’d start by sharing a discovery I’ve made about SuperDuper’s log files.
SuperDuper! generates a log file every time a backup is made. The approved way of viewing the log of the most recent scheduled backup is from within SuperDuper! itself: bring up the Scheduled Copies window and click on the Show Log… button. This is not particularly convenient, as you have to open SuperDuper! and do a few clicks just to see if last night’s backup went OK. I’d prefer a more automatic way of checking on my automatic backups.
SuperDuper! works with Growl, and you can have Growl put up a notice after the backup that will tell you if it was successful. But I’ve never been to get that notice to stay up overnight, and I’m not a big fan of Growl, anyway. I have enough interruptions in my day.
It turns out that SuperDuper! (I’m really getting tired of typing that exclamation point) keeps its log files a few directories down in the
~Library/Application Support/SuperDuper! folder. The full path name is really long, so I’ll give it here as a list:
- Application Support
- Scheduled Copies
- Smart Update Backup from Macintosh HD
The exact name of the Smart Update… directory will depend on the name of the disk that’s being backed up.
Within the Logs directory are all the individual log files. If you’re looking at them from the command line, they’ll have names with the form
yyyy-mm-dd hh:mm:ss -zzzz.sdlog
giving the date, time, and time zone (a 4-digit offset from UTC, like -0500 or +0100) of when the log file was made. The contents of the most recent of these files is what shows up in the Log window in SuperDuper!.
The log file is in RTF format, which is kind of a pain, but if you have the Developer Tools installed, you can convert it to plain text by passing it through the
convertRichTexttoAscii tool buried down at the bottom of this path:
I learned about this from an old post by John Gruber. I put a copy of the utility in my
~/bin folder and called it rtf2txt. It’s pretty handy.
So far, I’ve done nothing with these log files, but I plan to write a short program that converts the latest log file to text and extracts a few lines from it--just the date and whether the backup was a success or failure should be enough. I’ll then have GeekTool run that program a few times a day and put the results on my Desktop for easy checking. I’ll post the program when I get it written--probably next week.
As for why I’m now using SuperDuper! instead of rsync…
My family has an iMac that’s shared between four users, and I wanted a backup utility that:
- Could be scheduled for automatic backups. Rsync can do this through cron or launchd, so no problem here.
- Could be run at any time by everyone in the family. Making a backup at any time is important because scheduled backups are necessary, but not sufficient. When you come back from vacation and dump all your photos onto your hard disk, you don’t want to wait around for tonight’s scheduled backup; you want to make sure they’re backed up right there and then. I suppose I could put some GUI shell around rsync to make it less scary to my wife, but that seems like a lot more effort than the $30 that SuperDuper! costs.
- Could backup the entire Users folder at once. Rsync doesn’t want to do this when run by a normal user as a cron job. Maybe it would work as a launchd process, but that means I have to learn more about launchd. I’m not opposed to learning new things, but we’re back to that $30 of effort thing again.