Converting from one Mac to another: Migration Assistant, data cleanup

May 21, 2007

I spent the better part of this Sunday switching from one MacBook Pro to another. The old one was Intel Core Duo, the new one is Core 2 Duo :) with some other specs beefed up as well, so it packs a bit more punch.

There are two main visible differences between the machines. The first one is that the new C2D machine has both FireWire 800 and 400 interfaces and thus one more connector, whereas the old CD one has only FW400 connector. The other difference is that with the built-in iSight, in the upper part of the casing, in the old machine you can see both the camera lens and the LED pinhole that goes green when camera is operating. The new one has these as well, but there is no more LED pinhole visible -- it still goes green when active, but when in an idle state, it is somehow hidden behind the casing so that there is no more visible pinhole. So in a newer model, although there is a new connector for FW800, there is actually less visual clutter in the area that you actively look at, and visual noise has been reduced without damaging the functionality. (y)

So... about the actual migration. The idea was to get all my data and settings over as painlessly as possible. With the data being on various places of the hard disk as well as within the Parallels virtual machine (some Windows-specific stuff).

Initial migration

When setting up a new machine, Mac OS X offers you to transfer the data at setup time. I skipped it, but in retrospect it would have been good to do this right when setting up the new machine. This is because among all the data transferred are also user settings and preferences and documents and everything like that. When doing it later, you might not get the user settings automatically migrated if the usernames on the old and new machines are the same.

Anyway, when you have installed a new machine from scratch without migrating anything, but it's otherwise running fine, you just fire up the utility called "Migration Assistant". It walks you through the process, tells you how to connect your two Macs using FireWire and how to boot the old Mac up in "target disk" mode, where it simply functions as an external FireWire disk.

The Assistant then copies over the user that you select, as well as everything in the system's /Application and /Library folders. This took about two hours in my case.

Applications and libraries

I'm starting to like Mac application bundles more and more. The /Applications migration was absolutely smooth, all the applications simply appeared in their new location and that was it. If the application already existed on the new Mac, it was named "X (from old Mac)" in the Applications folder, so that you could review it and possibly move over some needed things -- some applications also store some data in their folders. And the latter actually was a problem in some cases -- even though the usernames were the same, the "short user names" did not match, so that some data was migrated with the old user's permissions, and the new user and applications didn't match it. Not sure what's the nice GUI solution for this -- in my case, it was a simple run of "sudo chmod -R myname applicationname" in the Applications folder for the affected apps.

Also /Library was nicely migrated -- this is where things like Python libraries and all sorts of frameworks go when you do development, and these now nicely got picked up so that you wouldn't need to reinstall everything fully from scratch.

Cleaning up user data

If you have a user with the same name on old and new Macs, your current user in the new machine does not get the data and settings and documents of the old user. Rather, the old user is migrated over into a fully separate account -- were you to log in as the old one, you'd get all the settings and things. But in my case, I also prefer to do a bit of cleanup and start with fresh settings on the new machine.

So what I did then was to go through the old user's data on the new machine and manually copy over the things that seemed relevant, such as application data from "~/Library/Application Support" for the relevant apps. Same for Documents and Music and Movies and Pictures. Just make sure that the apps whose data you are copying are not running at the time, as this might cause unpredictable results or data loss. Some data is also directly under ~/Library, such as Thunderbird local mail and Safari bookmarks.

And then I was pretty much done.

Cleaning up old Mac

Not much to do there -- depends on how much you'll use it. In my case, I'll just wipe the whole thing. One thing to do is to deauthorize any iTunes accounts that you might have active on the old one, as otherwise these might be "lost" for future use and you might hit the "5 machines per username" limit.

Migrating Windows data from Parallels

I also had some data in Windows. I might have as well migrated over the whole Parallels virtual machine with all its hard disks and data, but the VM itself was kind of toast so I also did a fresh installation of Windows on Parallels in the new machine. And the easiest way to migrate any relevant data from Parallels was to connect an external USB hard drive to the old Mac, unmount it in OS X and connect the USB device to Windows, who could then operate with it and copy files to it and then I could copy these straight into the new Mac and the Windows running on its Parallels.

Bonus: turning on FileVault

After I was done with all of the above, I had this "great" idea to turn on FileVault for my user on the new Mac. And so I did, and I can only praise myself that I did it after my day's tasks were all done. I also chose to "securely erase" all the former content. And I had about 30 G of data and everything in my home folder.

It first showed the "encrypting" prompt for FileVault and was done in about two hours. But then it started to "securely erase" stuff and this took much much longer. I guess it overwrote the data multiple times with random stuff and this took a long long time. It wasn't done a few times that I checked during the night :) but fortunately it was done by morning so I could go to work. And so encryption took about two hours (until midnight) and the secure erasing took all night.