A Restore Tale
If you're reading this, you probably already know that while backup strategies are important, restore strategies are what really matter. If you aren't able to restore a database when a disaster has occurred and money's on the line, you may find yourself very quickly updating your resume and leaving town. Practicing restores will not only tell you that your backups work, it also gives you good practice for your restore process. (If you don't have a restore process, then it's an excellent opportunity to create one!) When the CEO is tapping you on the shoulder wondering when the database will be back online, wouldn't it be great to look like a pro flying through the menus (or better yet to have everything scripted out) instead of clicking around like you haven't done a restore in years? You'll also have a pretty good idea of how long a restore will take if you've practiced recently and kept track of the time, which will come in handy when everyone wants to know how long it will take to get things back up and running.
About a year and a half ago, I took the plunge and bought a Mac. I've been very happy with my purchase. A few months after buying it I decided to drink a little more of the Kool-Aid and start taking backups using Time Machine. I saw this as a way to preserve my system state in case something should ever go awry. A little later when OSX Lion was released, one of the new features it included was FileVault 2, a tool which can encrypt an entire hard disk. I tried FileVault 2 a few months ago just to see what it was like, and kept it enabled when I saw no significant performance hits for my everyday tasks.
Fast forward to last week. I was interested in seeing if my backups actually worked or not, so I decided to restore my entire computer to my most recent Time Machine backup. According to everything I had read, restores would be a snap. Boot the computer while holding down Command-R and you'll be taken to Lion Recovery, which presents you with a few options including running the disk utility to repair hard drive errors and restoring your computer from a Time Machine backup. After selecting restore, you choose the source drive containing the backups, the backup you're restoring, and the destination drive you're writing to. This is where things got interesting for me, because my hard drive never appeared in the list of destination disks. I waited a few minutes to be absolutely sure nothing would pop up, and then started looking for other options.
I had recently read an article on Ars Technica talking about issues with encrypted drives in Lion, and while the author of that post didn't have the exact same issue that I did, he did find a solution that helped me a little. If I opened the disk utility I could unlock my encrypted disk with my password, and then when I went back to the restore menu my drive had magically appeared in the list of possible destinations. I selected my drive and started the restore process. Mission accomplished, right? After a while I got the screen saying the restore had completed successfully and a reboot was necessary. Rebooted, and I was taken right back to the recovery manager. I tried disconnecting my Time Machine disk and rebooting again, and was greeted by a wonderful picture of a folder with a question mark on it. I figured this means my machine couldn't locate a bootable disk. I rebooted again and used Command-R to get back into Lion Recovery. Thinking maybe my most recent backup was bad, I tried restoring a different backup and got the same result. After a few more tries with no luck, I decided to give in and call Apple support. I'm not a very big fan of calling tech support, but I did pay for AppleCare so I might as well get my money's worth.
I got through to a technician right away (possibly because I was calling during the Super Bowl) and explained my situation and everything I had tried, including the fact that my drive was encrypted. He had me run disk repairs on my laptop hard drive and the external drive containing the backups, no errors were found on either. He told me he had no documentation mentioning what to do for a drive that's been encrypted with FileVault 2, but passed me along to a higher level of support as they were more equipped to handle such an issue. The next technician walked me through deleting and re-creating a new encrypted partition on my drive, and then sent me on my way to do another restore. She gave me her contact info and said I was more than welcome to call back if I had further issues, but if the restore didn't succeed at this point, there was probably something corrupt in my backups.
This restore completed successfully just like the others, but my machine still wouldn't boot. Out of frustration I decided to create a non-encrypted partition and try restoring to that. Lo and behold this worked and the machine booted right back to the way it was a few hours earlier. Due to the issues I encountered it took way longer than I had hoped, but at least I didn't have a pretty aluminium paperweight anymore!
Based on my experiences, it appears that a Time Machine backup can't be restored to a drive encrypted with FileVault 2. It also appears that Apple support is not aware of this, or at least it was never brought to my attention that there might be an issue. I'm happy I was able to figure this out, and the whole ordeal made for some great practice. Furthermore, if I ever need to restore in a hurry, I'll now know what to do.
Have you practiced your restores lately?