MacOS – Restoring User Folders to Different Volume

backupmacosrestoretime-machine

Okay, so I need to restore a machine from a Time Machine backup, but before it failed it had two separate volumes; one for the OS, apps and the administrator account, and one for all other user accounts. However, both volumes were lost, and will need to be recreated from my backup.

What I want to know in advance is whether it is possible to restore the user accounts to the new users volume using the Migration Assistant, or will it try to restore them onto the system volume? If the latter, is there another way I can seamlessly restore the user accounts?

I've restored files using other means in the past, but that was a long manual process targeting specific things, and usually as part of a clean install for a new OS version, to avoid restoring leftovers etc. However this time I'm restoring due to hardware failure, so I'm not changing the OS, and I'm hoping to restore as much as possible as-is, albeit in stages (as some user accounts are very large, probably needing to be left overnight).

Basically I want to be able to setup my replacement hardware, restore the OS, apps and admin on one volume, and restore the other users one at a time, such that each can just log-in like nothing happened.

Best Answer

Okay so I went ahead with the update anyway and it turns out that Migration Assistant is clever enough to recognise relocated user accounts.

In my particular case it recognised them, but provided no option to restore their contents (just the account itself), possibly because my users volume hadn't been recreated at this point.

However, after restoration was complete, and I'd recreated my users volume, all I needed to do was pop into Time Machine and restore the user folders from there, with the added advantage of the system still being usable throughout via my admin account.

For anyone in a similar situation, here are the basic steps that I followed:

  1. Reinstall OS X as normal, at the restoring content stage select to restore from Time Machine, and restore as much as little as you like. Relocated user accounts at this point show up as 19kb with a note that they were relocated; select them to restore the accounts. You'll need at least one account on the system volume to login, so if you don't have any to restore then I recommend creating an administrator account; this has the added benefit that you can downgrade your other users to standard for security.
  2. Disable Time Machine in System Preferences to prevent a premature backup.
  3. Once you're happy the basic OS is set-up (updates applied etc.) you can now recreate the user-accounts volume. Make sure that Time Machine is disabled throughout.
  4. Now locate your computer's old backup folder; do this by opening your backup volume in the Finder and opening Backups.backupdb, and it'll be one of the folders inside (usually just one for a single-machine backup drive).
  5. If Time Machine didn't ask to inherit your backup drive, you'll want to make sure you inherit it manually (or it might see all files as new). To do this, open Terminal and enter sudo tmutil inheritbackup now take your machine's old backup folder and drag it onto the Terminal window to add its path. Your command should look like: sudo tmutil inheritbackup /Volumes/Backup/Backups.backupdb/Haravikk\'s\ Mac, you'll be asked for your password to run the command (must be run by an administrator).
  6. Next you'll want to make sure you've associated the new volumes with their backed up counterparts (since newly created volumes will have a new unique ID). To do this open your machine's backup folder, and inside it open up the folder named "Latest", here you should see an entry for each volume that Time Machine was backing up. In Terminal, enter the following command: sudo tmutil associatedisk and drag the appropriate folder onto the Terminal window, then drag the corresponding volume on as well, your command will look like: sudo tmutil associatedisk /Volumes/Backup/Backups.backupdb/Haravikk\'s\ Mac/Latest/Users /Volumes/Users, hit enter to run the command.
  7. Now when you open up your Users volume in the Finder, you can use Enter Time Machine from the Time Machine menu and use it to go back to see your old user folders, simply select each one you want and click Restore. You can do this several time if (like me) some user accounts are bigger than others.

Once you've restored all the user accounts, you should be safe to re-enable Time Machine backups, and the accounts should now work just as they did before (though some passwords may need to be re-entered).