Migrating OS X to a New Disk (Via a Network-Stored Backup)
I’m posting this here for posterity since I’m sure that I’m not the only person who’s ever wanted to do this and I had to piece it together from a few sources. And yes, I know, this is made much easier if you use Time Machine. Shut Up!
I decided to upgrade the HDD in my MacBook and didn’t want to start afresh with a clean OS. I don’t have a spare external drive lying around, so I don’t use Time Machine (I know, I know, I should, but my preferred back-up strategy works for me). What I did instead was use SuperDuper! to clone my current HDD to a SparseBundle on a network share. I then shutdown, swapped out the old disk for the new one and booted up the original install DVD for my MacBook.
My assumption was that I could go into Disk Utility, partition my new HDD and then restore the SparseBundle to it. Of course, things didn’t quite go according to script.
Partitioning went fine of course, that’s straightforward enough. My first issue was actually mounting the AFP share that hosts my backup. I’m not sure if it’s a peculiarity of my file server - which runs Ubuntu with netatalk to share via AFP - but even though the server itself showed up in the network sidebar of the ‘Select Image to Restore From…’ file dialog, none of its shares did. The shares on my Macmini did, however. Thankfully this was an easy one to solve: quit Disk Utility, start Terminal and mount the share from there:
mount_afp afp://dermot:firstname.lastname@example.org/Backup /tmp
(Yes, I mounted it to /tmp - there are almost certainly better places to do this but it worked out OK so I’m not bovvered).
Exit Terminal, back into Disk Utility to try restoring again. No dice. I could see the share in the dialog now, but the SparseBundle was greyed out. Bah! After some Googling I found my answer. Exit Disk Utility, back into Terminal and…
hdiutil attach /tmp/backup_20110728.sparsebundle
Back into Disk Utility to try restoring again. This time I just had to drag the mounted backup from the side-panel on the left into the ‘Source’ field, drag my HDD into the ‘Destination’ field and click ‘Restore’. Job done (after a couple of hours!).