Using Time Machine to Migrate to a new Mac

One reason people love Apple products is that they typically "Just Work".  This isn't always the case, though.  On iOS, it's easier for Apple to ensure that everything matches a simple configuration and they can make more assumptions.  Mac OS also typically works out of the box, but sometimes there can be problems.

Here is one example:
I had a 2010 Macbook Air that was getting a bit underpowered for my needs.  (128GB of flash was extremely limiting, and 4GB is not really enough to use for VMWare with Windows 7 if you want decent performance).  I upgraded to a new machine with 8GB of ram and 512GB of flash - which is more than enough for my purposes.

At any rate, there are a few ways to migrate your stuff to a new system:
1. Manually, copy everything across you need.
2. In one shot, using a disk image method
3. Using a time machine backup (Restore or migration)

Option 1 is not so bad if your setup is simple, you just copy your files across.  You have to recreate user accounts, though, and more complicated programs that required an installer will have to be reinstalled (do you have the serial numbers handy for re-install?)  For the next several months you will find things not quite right like:
1. How did I enable tap to drag on the touchpad?
2. Why doesn't the "locate" command find anything anymore?
3. You will have to re-download any voices or dictation languages used.
etc.

In short, it's a pain. If you copy your preferences as well, things are a little better - but why suffer if you have better options?

Option 2 - The disk image method.
This method involves using some tool (even the built in "Disk Utility" to create an image of your whole drive, and then restore it to the new drive.

The advantage is that it will restore everything to exactly how it was on your old computer.
I've used this method in the past multiple times (all the way back to the 68k era, and on Intel based Macs as well) and it typically works very well.  Apple doesn't support it, however.  The reason is probably because some Mac OS installs are customised to only contain drivers and code for the machine they are installed on.  If the source and target Mac are very different, then you could have crashes, slow performance, quirky behavior - or it might just not boot up at all.

Of course you can try it and see if it works, but it can be rather time consuming if you go through the whole process only to find it doesn't work and you have to start over using another method anyway.

Note: If you use the source machine's "target disk mode" to copy the whole disk using Disk Utility, it's effectively the same thing.

Option 3 is a newer option, available on systems that support Time Machine. (i.e. recent versions of Mac OS).  Actually there are two parts to option 3.
a. Restore the whole system from a time machine backup using the recover partition on the target computer.  I won't cover this further because it is very similar to option 2 in effect, and only supported if the backup is from the same machine you are restoring to. (The same model should work with no problems).  There isn't really any advantage over using the disk image method, except that you might already have the time machine backup ready to use if you have been regularly backing up.
b. Use the Setup Assistant or Migration assistant to migrate files from a Time Machine backup or via the network.

Ok, so now you know the options.  Apple tells you to use Option 3B if you get a new Mac and you want to migrate your applications, documents, and settings.  Despite owning multiple macs and having upgraded several times, I have never used this option in the past.  If I was replacing a machine, I just used the disk image method, and if I was adding a new machine, I just copied/moved what I wanted to the new machine.

Yet, this time I am replacing the machine, so I want to move everything over - especially because I am trading in the old machine.  (I have several days to keep it in order to transfer everything over).  This is the official supported option from the "Just Works" vendor, so it should be easy, right?

So here goes:
1. I connect both machines to my WiFi network.
2. I launch the migration assistant on both computers as instructed.
3. I select the network method and my old computer.

I get a message telling me that I can't migrate from a newer OS to an older one.  What?  It is't just copying files it should work, right?  Well I suppose some OS preference files might have unrecognized options or something...

So I had to install the latest OS X 10.9 version on the new computer before I could continue.  As an aside, this is probably a common situation.  When people buy a laptop, it has often been sitting on the shelves for a few months, and may not be the latest version when it is finally purchased.  On the other hand, even an older laptop can easily be running a newer version of the OS if the owner updates it properly.  And you have to download the OS installer, which could take many hours if you are not on the speediest of networks.  Luckily, I had a copy of it already.

4. I select everything I want to be transferred.
5. I start the process.

Good, right?  No.  It's *terribly* slow.  My old computer "only" has WiFi N, and it tells me that it will take 16 hours to complete.  Well that's a bit crazy, but whatever.  I decide to let it run while I go out shopping.  When I come back at the end of the day, it still says there are 14 hours remaining.  I start to wonder if this is a trick.

The really bad thing is that both computers are logged out of your account and running the migration assistant, so you can't use either of them while the migration is ongoing.  I guess no watching Hulu to pass the time.  Come on Apple, at least let me use a guest account to use the internet or something!

I go to bed.  In the morning, I am greeted by a message that it is trying to reconnect to the network.  Great.  Apparently it stopped just after I went to bed because it hadn't gotten very far.  It also doesn't seem like there is anyway to fix (or even see!) the network settings from inside the migration assistant, so I have no option except to hit "cancel".

After selecting Cancel, I saw that one of the laptops had disconnected from the access point.  Now, I have to ask, why does the migration assistant not use ad-hoc networking like AirDrop?

I don't know what happens to the data it had migrated so far, but it seems like it was deleted from my cursory examination.

The other thing is, it says on the migration assistant screen "Connect a wired network to increase the transfer speed" - which is a cruel taunt considering that the MacBook airs don't have any ethernet ports!
Looking online, there are several ways:
1. Use a Thunderbolt cable.  (Doesn't work since my older laptop doesn't have it)
2. Use a Firewire cable.  (Doesn't work since neither laptop has it).
3. Use an ethernet cable via USB adaptors - but this would require me to have TWO ethernet adaptors.  I have one that I have used about... never.  I don't want to go buy another one when I rarely use the one I have.

So, what to do?  Oh, I know, I'll use the Time Machine method.  I actually had a USB drive that I use for Time Machine already, but it was a bit out of date.  I plugged it into my old computer and let it update the backup.

I plugged it into the new computer and ran the migration assistant, and... nothing.  The backup didn't appear.  I plugged the drive back into my old laptop and went into the Time Machine browser and it worked fine and showed all my backups.  Hmm...

I searched online and found various similar problems, but none seemed to be exactly the same as mine.  I decided that perhaps the drive image route wasn't such a bad idea after all.

I realized that one bad thing about the drive image option was that if I restored the drive and it didn't work, then I would have no working system on the new machine.  I would have to boot to the recovery partition to restore the OS, which would involve downloading it again.  (Or, I could make a bootable USB drive...)

I decided there was an easier, faster, safer way.  I simply went into Disk Utility, split the existing partition into two, and then copied the existing OS X partition over the new one.  There, two working OS X boot partitions.  (This was possible because the new computer has a much larger SSD than my old one).

Then I need to go to the old computer and make an image.  I plugged in my USB Hard Disk again, went to Disk Utility, and made an image.

Actually, first I tried to make a normal image.  The problem was that it tries to write out the entire image to the external drive, and writing a 128GB image to a USB2 hard drive takes a very long time.  I stopped the process and re-created the image with the type "Sparse disk Image".

Next I tried to copy the SSD to the image file.  The Disk Utility told me that I would have to boot to the recovery partition first.  That makes a certain amount of sense, since the source disk is of course in use - but at the same time, doesn't BSD have snapshotting ability?  Oh wait, this is HFS.

So I boot from the recovery partition and start again.  This time I get a different error, something like "Drivers for this image type are not loaded."  I assume that means that the Sparse Disk Image type is not supported when you have booted up from the recovery partition.  Great.  So I though about re-creating the normal (non-sparse) disk image, and then actually copying the disk.  It seems silly that it would have to write out the entire empty image and then do it again with the content.  (Isn't there any way to create the image file while you actually copy the disk?)

So I started to thing the Migration Assistant might actually be the path of least resistance after all.

Eventually, I found the culprit.  The time machine backups need to be "full backups" that contain certain system folders like "/private", etc.  This is because the Migration assistant uses those folders to find the user accounts, etc.  That's great, but:
1. Why doesn't the Migration Assistant tell you something like "I found a backup, but it's not usable because it's missing..." instead of just not displaying it at all?
2. Why do my backups not contain all of the required files?  The only thing I had excluded was VMware images.

But nonetheless, a trip into the Time Machine GUI confirmed that the /System folder (and others) were not contained in the backup.

The actual fix wasn't too difficult.
1. Remove all time machine backup disks from the preferences and turn time machine off.
2. Delete the existing backups (just in case)
3. Delete the system-wide Time Machine preferences file (from the terminal)
4. Re-Enable time machine, and re-add the external disk.
5. Start the backup and wait a really long time for it to complete.

What was the problem?  Well something, somewhere screwed up the preference file.  There are two really bad things about this:
1. There is no way for the user to see it or know that there is a problem unless they really search for it.
2. There is not even any way to fix it from the user accessible preferences.

(You can find out more about the problem here):
http://pondini.org/TM/Troubleshooting.html

The worst thing is, I am not even sure Apple has officially recognised this issue, much less fixed it.

At any rate, once the backup finally finished, I ran the migration assistant on the new computer and it "worked".  I put quotes around "worked" because it doesn't copy everything.  My older version of XCode that I purposely kept around wasn't copied.  Kernel extensions also apparently weren't copied, because things like VMWare complained at first.

So, almost 24 hours to get (mostly) everything copied over to my new machine - with quite a bit of trial-and-error, internet searching, and technical skill.  I would say Apple fails the "Just Works" test this time.

I was really hoping their spiffy utility would have the whole process done in an hour or two while I did something else.

Disclaimer: I like Apple and OS X, but sometimes you have to call it how you see it.  The main reason I am writing this post is so that other people with the same problem might find this post and save themselves some trouble.

Comments

Popular Posts