One of the OS X laptops was acting insanely slow, blocking, beach-balling. I installed a SMART disk checker which confirmed the hard disk was failing badly.
We use CrashPlan on our developer laptops but this one didn't have it. We quickly downloaded it, and set it to backup with the 30-day trial into CrashPlan Central's hosted backup; I could have backed up to a local Mac which already used CrashPlan but this was even faster and the disk was almost completely dead. It took a while, largely because the source disk was so broken and slow, but overnight, CPC had a copy.
A trip to the Apple genius bar with the secret password "Apple Support Contract" and we had a new disk installed in an hour.
Now for the acid test: how to restore? Never had to do this before. Create the initial user account for the primary user. Then...
We installed the CrashPlan client again, configured the account, and CP showed the backed-up data. Great. Just restore.
First try with defaults restored to the desktop of the restored user, not what I wanted.
Second attempt I specified to restore into the actual original directory. Seemed to work. But none of the user settings were remembered -- email accounts, app license keys.
Finally restored an individual ~/Library/Preferences/appname.plist file onto the Desktop to look for license keys, and found I was not allowed to open it. Ah ha! Ownership/permissions problems. The restored file was uid=502, but my newly created user was uid=501. So I re-created the user, with the same home dir as it originally had; OS X allocated uid=502 to it, and it found the entire directory tree that had been previously restored for that user's home dir, under the original username.
Sweet. All the Mail and app settings and license keys were back.
I need to come up with a better way to re-create users on a new disk with the right UID so this is trivial. In the past I think I've found this a bit difficult on a Mac.