Mac OS X’s built in Migration Assistant is a little understood, little used beast. The gist is that it imports a NetInfo Database, assorted plist files, User Directories, and other data from one Mac to another, ostensibly due to the user upgrading to a new computer. Always looking to make things a little easier, I put the Migration Assistant to work as the “restore” half of my backup plan. This works great for mass Mac configuration, too. Set one up, clone it to disk with this procedure, then you can use the disk (or several disks) to quickly close user accounts, home directories, and such to a great many Macs.
Run Down
- Create a DMG file
- Load it so that the Migration Assistant thinks it has a full, running copy of OS X installed
- Load it with unique data we want migrated or restored.
Create a DMG File
This is the easiest part of the whole endeavor. Use Disk Utility, hdiutil, or other arcane methods to create a disk image the size of the media you will be using. I create 4.7GB sparse disk images that will be burned to DVD. Obviously, if you’re going to CD, you want a smaller image. I call my volume “Migration Data” and I save it into /Users/Shared so that I don’t create any recursion problems later on.
Set Up the DMG
The Migration Assistant, it turns out, doesn’t really look too deeply into a volume. If there’s a folder at /System/Library/CoreServices and there’s a nidb in /var/db, all is generally good. I load up a few extras, as well, to make it a full system migration.
$ cd /Volumes/Migration\ Data
$ mkdir -p System/Library/CoreServices
$ sudo ditto /private private
password:
$ sudo ditto /Library/Preferences Library/Preferences
$ ln -s private/etc etc
$ ln -s private/tmp tmp
$ ln -s private/var var
That, it turns out, is all you really need. But while this will import a user entry into the new computer’s nidb and some system level plists, this isn’t the main attration, no sir.
Back Up Your Data
I create Users/jc on the disk image and load it with a DVD’s worth of my most critical data, in the same form it exists in my home dir. This works out to be my Desktop, Documents, Library, and a few other odd folders; everything except Music and Pictures, really. Those I back up separately. I also make a folder at the root of the image called Applications and load it up with any non-standard apps that can live through a drag-install. When you’re done loading it full of your data, burn the image to disk.
Disaster Strikes
This is the fun part. If you, for whatever reason, find yourself on the short end of a catastrophe and have to erase and install or even replace your hard drive, OS X presents you with the new-fangled Migration assistant. Just insert your disk, tell it that you’re migrating from another volume on this Mac, and it does the rest.
And if your home is less than a dual-layer disk, then just
dittothe whole home to such an image and burn when needed to restore. Or clone the whole disk to an image on a share and after setting your machine up again just connect to the server, open the image, and run Migration Assistant again and it will do the right thing and bring it all back, even though you’ve already logged in and setup an account. (Which is to say, prompt to use a different username or replace the one you’re using if they are the same.)I thought as much. Used MA once, and thought it far too smooth to be left to n00bs and switchers. Now if you would please write a nice little script that I can copy and paste. Without too much thinking involved, thank you.
Moral of story: not all who wish to use geek have the sort of mind to work it. And, say, did you ever see your own very special post, written just for MG … and only faintly insulting, as I recall. I tried to send you. (I don’t get trackback either, nor does Blogger, apparently, and probably neither of us give a fig. We ain’t all on MT, ya know. Oops! Drupal.)
Crap. I signed up with the wrong username.
Zo
humorlessbitch.com
That answers your first complaint. This is not Mac OS X Hints.
As for the rest, I see English words but … not English. Can you try writing that in such a way that it conveys an intelligible thought?
Check all that apply:
a. You have zero sense of humor (although many geeks are extremely funny.)
b. You are genuinely clueless as to most social norms, and have no idea how condescending, rude and just plain inappropriate your response is.
c. You imagine that any form of thinking or writing that doesn't readily present itself to your particular way of thinking .... needs fixing.
d. You suffer from the arrogance that accompanies Geek Syndrome, but believe it is earned.
e. You did read my post and were offended, know your response is rude but think I deserve it .
Sometimes the posts here are at my level of technical understanding, sometimes not. Have you considered a screening test at registration? Or perhaps a little sign, similar to that on Calvin and Hobbes' clubhouse, only instead of Girlz, you could put, “No Right-Brain Types Allowed.”
Oooo, cool idea. I’ll start on the sign.
The sign should read G.R.O.S.S. ( Get Rid Of Slimy Girls) .
Nah, the ladies are welcome.
Perhaps GROPES? Get Rid Of Persons Exhibiting Stupidity?
I dunno. It’s a geek site; get over it.