MacOS – How to restore a Time Machine backup from a 2 HDD setup to a single HDD

macossymlinktime-machine

My current (being phased out) setup on my iMac is SSD contains OS, HDD contains my home folder.

/Volumes/iMacSSD/ is the OS
/Volumes/iMacSSD/Users/iMac or /Users/iMac is a symlink to /Volumes/iMacHDD/iMac
/Volumes/iMacHDD/ is my 2T HDD I want to put everything on. There is enough room!

On the time machine backup, that is how it is stored. Both drives are backed up and all my data is there.

I want to remove the SSD from the iMac and just have the single large HDD. When I restore from the TM backup the home folder is just a symlink to a folder that does not exist. This is expected.

I have manually removed the symlink and replaced it with an actual folder, but trying to copy the backed up 'home' folder is not working out so well.

I want to just "move" the contents of /Volumes/iMacHDD/iMac to /Volumes/iMacSSD/User/iMac. This would make the backup like it came from a single drive. So when I restore to a single drive everything would be there.

root privileges is not enough to modify the TM drive. How would I go about converting the symlink iMac to a hard link? or is there a better option?

Any attemp to modify (via rm cp mv) results in a "this is not allowed/you can't do that" error. (I don't recall the exact wording)

EDIT: "error" messages
rm iMac = rm: iMac: Permission denied
sudo rm iMac = rm: iMac: Operation not permitted

Best Answer

After a lot of searching and messing around I found the answer.... thanks to this post

/System/Library/Extensions/TMSafetyNet.kext/Contents/Helpers/bypass will allow you to make changes.

BUT.... I could not perform a mv so I resorted to using rsync right on the TM backup and ignored most of all my files. This in turn allowed me to restore to a slimmed down backup.

After this I tried using Time Machine to copy the rest of my files back to my home folder, it kept failing.

In the end, enabling guest login and using rsync got me what I wanted.

If I had to do this again I would do it this way;

  1. Do the restore as per normal, the login WILL FAIL! this is because your home folder is a broken symlink.
  2. Boot back into the recovery/install disc and use terminal to rm the symlink and mkdir your home folder of the same name. (you may need to chown this to your user) ** if you can also use rsync from this terminal, skip the Guest step and use rsync now. I could not**
  3. Do a regular boot, once logged in, turn on Guest login, logout and back in as Guest
  4. Open terminal and su to your user.
  5. Use rsync directly to the TM volume and restore all your home folder.
  6. Check and make sure permissions are correct, reboot!
  7. Everything should look just as it did before you removed your first/second HDD. Turn off Guest login.

Never symlink your home folder! While this worked fine, it made recovery a PIA! rather, symlink your individual folders like Documents, Music, Photos, Movies, etc. It doesn't look as clean, but in the end, it is safer.

If my "data" drive had gone down, I would have had the same issues as I did with this. A system I can not login to.