A couple of weeks ago, I set a magnetic money clip on top of my MacBook, killing the hard drive pretty much instantly. It made a funny grinding noise, the beach ball spun, and that was it. The hard drive never had a chance.
Fortunately, I have been backing up my Mac regularly with Time Machine, and I had a backup that was only a week or so old. I do nearly all of my work in version control or in the browser, so the only thing I stood to lose was a few tracks I had purchased from the Amazon.com MP3 store.
All I had to do was replace the hard drive and restore the backup.
First, I had to buy a new hard drive. Hitachi’s 7200 RPM notebook hard drives are the most highly regarded, but they were out of stock at Amazon, so I bought a Western Digital 320 gig hard drive instead.
Installing the hard drive was easy. Macinstruct describes the process as challenging, but it took me less than 15 minutes.
I have two different Leopard DVDs, and I couldn’t get the MacBook to boot from either of them (I still don’t have any idea why). So I booted from the OS X 10.4 CD, formatted the new hard drive, and installed the OS. Then I booted from the Leopard DVD (again, I have no idea why it didn’t work before but it did work after) and upgraded to Leopard.
At that point, I realized that restoring from Time Machine was something you have to do after booting from the Leopard install DVD. So I rebooted from that DVD again, and restored the Time Machine backup.
When I rebooted after the restore was complete, the MacBook started rebooting over and over and over. It wouldn’t even boot into single user mode. So I rebooted from the Leopard DVD again and used the Disk Utility to repair the disk and the permissions. There were no disk issues, but there were a few file permission issues. It fixed those, but when I rebooted again, the reboot cycle started all over.
At that point I was at a bit of a loss. I thought the problem may be a corrupt operating system, so I booted from the Leopard DVD and reinstalled the OS in Archive and Install mode. That failed, complaining that it couldn’t copy my user directory.
I figured my last shot was just to install a fresh copy of Leopard and manually copy my files from the backup drive. Before I did that, though, I tried running a Time Machine restore again, and this time it worked, restoring my machine to the state it was in before I destroyed the hard drive in the first place.
Conclusions
Time Machine works, but not incredibly well. Life would have been easier if I’d had a backup created using Carbon Copy Cloner or SuperDuper. I could have booted from the backup drive and restored to the new hard drive.
Had the MacBook been my only computer, the whole ordeal would have been incredibly stressful. It took me several days to get the new hard drive, and the restoration process was abetted by having another computer next to me that I could use to look up answers to the questions I ran into.
If I had to depend on the laptop for my day to day work, I’m pretty sure I’d keep my Time Machine backup drive and add a second external hard drive to the mix with a disk exactly like the one in the computer. I’d run Time Machine full time (as I do now), and make a supplemental backup to the second external hard drive weekly with a full system backup utility. Then in a disaster scenario, I could just swap out the dead hard drive with the second backup drive and experience zero down time. Large laptop hard drives are less than $100, and you can get an enclosure for $20 or $30. That’s not a high price for insurance.
The most interesting feature in OS X Mountain Lion
Panic Software has a long post explaining code signing and Apple’s new Gatekeeper feature in OS X Mountain Lion. Gatekeeper provides a way for developers to digitally sign their applications, verifying their origin, and for those signatures to be revoked so that the applications cannot run any longer if they are shown to be compromised by malware. Users can decide for themselves whether they want to let their Mac run any application or only applications which have been signed. (Or only applications from the App Store, although I think you’d have to be crazy to do that.) What I find particularly interesting about this is that Apple had decided last year to implement much more draconian rules that would essentially force developers into the App Store by making that the only way that developers could distribute signed applications. Wil Shipley beseeched Apple to take another course and allow developers to sign apps themselves. Here’s the recommendation he made last November:
At the time, I read the post, linked to it, and thought that it made too much sense for Apple to do it. I was pleasantly surprised to see Apple take that advice.
Update: Nelson Minar reminds us that features like Gatekeeper require users to put a lot of trust in the gatekeeper. I think one reason people are happy about Gatekeeper is that it’s such a retreat from Apple’s previous untenable position.
Daniel Jalkut’s post on Gatekeeper is also worth reading. Gatekeeper is important because it’s a step back from Apple’s previous decision to essentially force developers to distribute their apps via the App Store. That was problematic because App Store apps will be required to operate within a very limited Sandbox. Daniel Jalkut argues that the next step for Apple should take is to greatly increase the rights granted to apps in the Sandbox. Even though Apple has climbed back from its stance that would force developers into the App Store (and Sandbox), it is still making some new features of the OS available only to apps that are distributed through the App Store, so it’s important that the Sandbox be flexible enough to satisfy as many independent developers as possible.