TIL I learned how (and how NOT) to restore my Mac backup

They say you never know if you have a real backup until you try to use it. They’re right.


  • Don’t encrypt your drive until you’ve restored your data
  • Don’t exclude things from Time Machine backup

The details

I sent my 2017 MacBook Pro to Apple because the keyboard was acting up. And as long as I was at the Genius Bar, I thought it’d be a good time to mention a weird problem I’d had when using Screen Mirroring on my Apple TV (moving the cursor would reveal things lower in z-order – it was weird); the Genius duly wrote that down and sent my machine to the depot for repair.

A few days later, the machine was back in my hands; not only had they replaced the keyboard and the top case (as I’d expected), but they also had replaced a few other parts – and they’d either wiped or replaced the SSD, so I had a virgin installation of Mac OS and none of my data. I booted up the machine, and, for security, told it to turn on FileVault to encrypt the SSD; then I set about restoring my data.

Plan A

I had multiple backups: Time Machine, a bootable clone drive (made with SuperDuper!), and Backblaze for offsite backup. I thought that the easiest solution would be to reboot from the clone drive and restore to the SSD, so I did exactly that.

The restore went fine, except for one small problem – SuperDuper! was unable to update the PreBoot environment. When I tried to boot from the SSD, I got a blinking folder with a question mark, which meant that the system couldn’t find the startup disk. I booted from the clone again and used System Preferences to set the startup disk to the SSD; this time, instead of the question mark, I was asked for a disk password…which, of course, I didn’t have.

Back to the clone, where I could easily mount the SSD and see its contents. Searching gave me this thread, but I couldn’t figure out how to apply the hints to my environment, so it was time for Plan B.

Plan B

I booted the “Install High Sierra” USB stick I’d kept around from last year and erased the SSD. Then I restored from my Time Machine backup. Many hours later, I was able to boot the SSD, and all seemed well.

Except…my desktop background was wrong. And my Dropbox folder was empty (though that was easy to fix by firing up Dropbox). And when I looked further, I realized that I didn’t have any of my photos, nor my iTunes library, nor my DevonThink databases. It was as if they’d never existed. But they were on the clone drive. Hmmm….

Plan C

I booted the clone and fired up SuperDuper! again. And, again, I restored the SSD from the clone, using “Smart Copy”, which found 150GB already on the SSD, and about 200GB of data that needed to be copied.

This time, when I booted the SSD, all was well – I had all of my data.

I opened Time Machine Preferences and discovered that I’d excluded my iTunes library, my Pictures folder, and my DevonThink databases from being backed up in order to save space on the drive in the Time Capsule that I was sharing among several computers. Oops. Especially since I’d stopped sharing a Time Capsule months ago and was backing up to a directly-attached 4TB drive, with plenty of space.


All seems to be well; I’ve removed the exclusions from Time Machine and it’s busily backing up everything now.

I haven’t checked to see if the Apple TV screen mirroring problem has been fixed – I guess I should find out, though.

I think I’ll wait a few days after Mojave ships before I upgrade; I really don’t want to go through this again any time soon!

Launch Services did it!

For quite a while, I’ve noticed an odd pattern whenever I open Activity Monitor on my Mac – something was writing to my disk every 2 or 3 seconds, at a peak rate of 4.5MB/second. Over time, the total data written would climb into the terabytes (far exceeding the total data read from the disk) – but my free disk space wouldn’t diminish. Looking at the system logs didn’t enlighten me, and nothing was obvious in Activity Monitor. I’d shake my head and ignore it.

This morning, I noticed the pattern again, right after rebooting the system, and I decided to try to find out what was causing the I/O.

First step: ask Google. In particular, I asked it what process is doing i/o mac and found many potentially-useful pages. The one I chose to pursue was an Ask Different question: Which process is periodically writing to the disk? because the screenshot in the question matched mine almost exactly.

The accepted answer to the question led me to try iotop(1), but I kept getting errors from DTrace (even though I ran it as root). So I tried what looked like the next best answer, using fs_usage(1):

sudo fs_usage -w -f filesys -e grep  \
   | grep -i ' write ' > /tmp/iouse.txt

and then looking at iouse.txt showed me that a process named lssave was doing a ton of I/O. A quick Google for lssave led me to this Stack Overflow page, which led me to this macosxhints discussion, which made it clear that I needed to rebuild my Launch Services database. I used Onyx to do the job, and voilà – no drumbeat of writes!

Two Minute Warning

One of the projects I intended to take on soon after leaving IBM was to write an iPhone app to keep track of our wine experiences. I haven’t quite gotten to that round tuit yet, but I have learned enough Objective C and Cocoa to write a tool to help with one of the aspects of David Allen’s Getting Things Done) methodology, namely the Two Minute Rule: if you can do a task in two minutes or less, do it now.

If you’re a Mac user and think you’d find a two-minute timer app handy, go visit twominutesoftware.com and give it a try.

Declaring victory

A few years ago, I had a great idea, inspired by too many days where I fired up Lotus Notes to find several screenfuls of new mail in my inbox, most of which was inconsequential, spam, or corporate spam. My first step was to filter out as much spam as I could; for example, I decided that any mail with more than a couple of non-ASCII characters in the subject was spam, and my filter deleted it before I ever saw it. Similarly, there were spammers masquerading as mailing lists; they were fairly easy to zap, too. (One could ask why IBM’s spam filters let such crap through, but probably not productively, so let’s not, ok?)

My next step was to find as much inconsequential mail (for example, notices from various systems) as I could and shunt it to secondary folders in my mail; I knew I didn’t have to tend to such mail immediately, but I did want it somewhere I’d visit at least every day or so. And I never did figure out how to automatically identify corporate spam, but the volume was relatively low, so I didn’t try very hard.

The system worked pretty well; I had to tweak it every time there was a new version of Notes or a new mail template, but that was pretty easy. And I kept using the system until IBM and I parted ways this spring.

I did the same thing with my Gmail, but it never felt as comfortable or as helpful. So this weekend, I went back to letting all my mail arrive in one inbox; I use filters to mark things like news articles and merchant offers as read, so they don’t affect the unread count in my mailbox and tempt me to open it, but when I do open the inbox, I have everything in one place.

So far, it seems to be working — of course, it requires me to be diligent about maintaining Inbox Zero — but that’s much easier with one inbox than with several.

Mac Migration Diary

One of the side effects of leaving IBM was the need to buy my very own laptop computer; naturally, I wanted a Mac. So when the upgraded MacBook Pros came out last week, I was quick to order one (15-inch 2.53GHz i5, 7200rpm drive, matte hi-res display), and I eagerly watched its progress on the Apple and FedEx websites until it arrived in my hands Wednesday, a day before the promised delivery date.

I had a backup of my old MBP, but I didn’t want to use the Migration Assistant to copy everything over, since many of the apps were now irrelevant to me (and some had been irrelevant since the moment I installed them!). I took fairly careful notes and thought I’d post them here to help myself the next time I need to change Macs (and if they help others, so much the better).

The physical unboxing, of course, was up to Apple’s usual standards; unlike a ThinkPad, there’s no silly wordless poster — the box and the contents speak for themselves. And the first boot experience was, as usual, straightforward (though I do wonder why there’s no Hebrew “welcome” in the initial video).

Before I got to work, I ran Software Update, which found eight or nine updates, all of which were applied in a single reboot.

Then I started to work on my applications and data.

The very first thing I installed was 1Password — but then I realized that if I wanted to use my saved passwords, I needed Dropbox, so I installed it, let it copy things, and then finished setting up 1Password.

In previous migrations, I’d always installed Quicksilver next, but its future is uncertain, so I decided to wait until later in the process and see how well I could live without it.

The next step was to start looking at the apps in the old /Applications directory to decide their fate. I’d picked up a number of random apps over the years, many in bundles, and decided that I would only install the ones which I was actively using. So I have bid adieu for now to Acorn, Amazon MP3 Downloader, Audacity, Caffeine, DaisyDisk, DejaMenu, Flip4Mac, Google Earth, HandBrake, RealPlayer, Shovebox, TaskPaper, VLC, and WriteRoom. I wouldn’t be surprised to want some of these again soon, though.

It was also easy to say aloha to apps which I used because of my work at IBM, including Lotus Notes, Lotus Sametime, Lotus Symphony, Microsoft Remote Desktop Connection, Mozilla Thunderbird, Second Life, and tn3270 X.

When it came to browsers, I was torn. Firefox has been my go-to browser for years, but it’s an awkward fit on the Mac since it doesn’t support Services; it also leaks memory like a sieve (though I guess it’s possible that the ton of extensions I’ve installed contribute to the leakage). I eventually decided not to install it for now and see if I can get by with Safari, OmniWeb and Google Chrome. I really like Chrome and would probably make it my default browser if 1Password supported it.

The apps I decided to migrate are AppZapper, Awaken, DEVONAgent, DEVONThink Pro Office, Evernote, Fluid, ForkLift, GPSBabel, Join Together, MailPlane, NetNewsWire, OmniFocus, OpenOffice, Parallels Desktop, PDFPen, PhoneView, Pixelmator, QuickTime Player 7, Skype, Snapz Pro X, Stanza, SuperDuper!, TextExpander, TextMate, Tweetie, WireTap Studio, and XMarks. In most cases, I downloaded a fresh copy, then used ForkLift to easily bring over the associated files in the ~/Library/Preferences and ~/Library/Application Support directories. In retrospect, I probably should have used AppZapper to identify all of those files instead of eyeballing it!

I expected to have to install Growl, but it came along automatically with some other program; I did have to reinstall the SmartSleep prefpane.

I installed two packages from their original DVDs: iWork ‘09 and the software bundle for the Fujitsu ScanSnap 1500; of course, I then went online to install updates for both of them.

I decided not to install the software bundle for my Epson Artisan 810 printer yet; instead, I turned it on and let the system find the right drivers. I’ll worry about the full bundle if I ever need it (and in the meantime, I have the Windows version on a different machine anyway).

The final piece of the migration involved data. My old mail files were in ~/Library/Mail and ~/Library/Mail Downloads (I’m not sure I needed the latter). My music was in ~/Music; my photos were in ~/Pictures. I also made sure to migrate ~/.profile and my ~/.ssh directory. And, of course, I had a lot of data in ~/Documents (including a Windows VM), though I did try to be selective in what I copied.

That marked the end of the migration, but I did decide to install a trial version of LaunchBar to see if it’ll replace Quicksilver in my heart and on my fingers.

Now, on to productive tasks!