Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macstatic

macrumors 68010
Original poster
Oct 21, 2005
2,001
162
Norway
I've just upgraded my mid-2012 Macbook Pro from 10.13.6 to clean install of 10.14.
Now I want to restore my home-folder from the external backup drive (backed up with Chronosync) and thought the quickest way would be to simply use the Finder's "copy/paste exactly" feature, performing this from another user account. But it didn't quite work. What am I doing wrong? Here's my procedure:

1) start up the Mac, log into the one and only user there (it's got the same name as the one in the backup. Let's call it "MAIN_USER")
2) create a new user ("Test") from the "Users & groups" system preference
3) log out of "MAIN_USER"
4) log into "Test"
5) Physically attach the external USB-backup drive
6) Copy (CMD-C) the "MAIN_USER" folder from the backup drive)
7) go to the MacBook Pro's user folder, then do a "Paste "exactly" there (CMD-ALT-SHIFT-V)
Screenshot 2023-03-22 at 15.46.20.png



8) the following message pops up since I'm trying to replace the "MAIN_USER" folder with the same name backup :
Screenshot 2023-03-22 at 15.30.53.png

9) when I click on the "Replace" button, the following error message shows up:
Screenshot 2023-03-22 at 15.31.01.png


From what I can find this error message has to do with emptying the trash, so I don't understand why it pops up here. Any ideas?
 

macstatic

macrumors 68010
Original poster
Oct 21, 2005
2,001
162
Norway
I still haven't found out why I get those error messages, but I discovered something very interesting and useful in the process.....
First, I used Chronosync (my backup software in addition to Time Machine) to copy my home folder back from the external backup drive to my MacBook Pro's "Users" folder (I'm not 100% sure I did it correctly, but so far it appears so).
The next step was to create an actual user account in order to access that home folder, and at this stage I wasn't sure what was going to happen (as I had already placed the home folder there), so I created a new user (System preferences - Users & groups) with the exact same username as before.
The result? This alert came up:
Screenshot 2023-03-23 at 07.39.43.png


So I clicked on "Use existing folder", then logged out of my temporal account and into the proper account of mine and it worked! I still need to look into if I really got everything restored, and it would be great if someone could tell me if there's a failsafe method to do this (copy a home-folder over from a backup drive to the Mac) using just the Finder or Terminal, but.....

Bottom line: it's possible to "link" an existing home folder to a user account that you create! I never knew this, and have struggled to create a user account first, then trying to restore the actual home folder's contents by copying back one folder at a time. This is much more efficient.
 

okkibs

macrumors 6502a
Sep 17, 2022
904
862
The only officially supported way of doing this is using timemachine, it allows restoring users. But what you did works, it's just a folder in the end.
 

macstatic

macrumors 68010
Original poster
Oct 21, 2005
2,001
162
Norway
Yes, you're right about it basically being just a folder.
But why the error message in my first posting ("The operation can't be completed because an unexpected error occured (error code -8072)"?
I've also gotten an error message saying "One or more items in USERNAME can't be changed because they are in use" which puzzles me. This was all while trying to copy the home folder over from the backup (while being logged into a different user account of course) within the Finder itself, so perhaps that's not possible? Or perhaps using the Terminal.

I did actually think about using Time Machine, but since I had backed up the Mac using Chronosync I quickly put that idea away. However, I just learnt from this guide that if the backup is a bootable one (which it is!), then Migration Assistant (from the /Applications/Utilities/ folder) can be used to restore a home folder.
 

okkibs

macrumors 6502a
Sep 17, 2022
904
862
Migration Assistant is what I meant, you'd set up the Mac with a temporary username, then launch Migration Assistant and it restores the old user, that's how I do it when setting up a freshly installed Mac.

The error messages appears because the user folder contains many thousands of files in the (hidden) Library folder that have custom file permissions set. There is no user that has the required permissions to access all files. You need to copy with root permissions, which limits you to using the Terminal.

However that might not actually work either, since MacOS will detect the new user folder under /Users immediately and might start accessing (and locking) files whilst they are still being copied. That will then end up with a cryptic error in Finder as well.

You can use rsync via Terminal for this (running it with sudo for root permissions) with the -a switch (-a is archiving, makes sure the destination ends up a 1:1 copy of the source), and if it gets blocked/interrupted you can run it multiple times until everything is copied. For the user folder it might help to boot a different MacOS or do it via recovery mode so that the MacOS in question isn't running and can't interfere.

But really, this works so well and simple with TM nowadays that I wouldn't think about touching any of this manually.
 

macstatic

macrumors 68010
Original poster
Oct 21, 2005
2,001
162
Norway
Migration Assistant is what I meant, you'd set up the Mac with a temporary username, then launch Migration Assistant and it restores the old user, that's how I do it when setting up a freshly installed Mac.

Good to know. And I understand the key to being able to use it is to have a backup in one of the two formats:
- Time Machine
- A bootable backup (like mine, done by Chronosync -or another similar app)

So a non-bootable backup done by something other than Time Machine -will that work too, or will that mean a time-consuming, manual and possibly problematic restore?


But really, this works so well and simple with TM nowadays that I wouldn't think about touching any of this manually.

Point taken. "If it works, don't fix it" is a good rule to go by :)
Although the restore method I used by using Chronosync to copy it all back appears to work I think I'm going to start all over again and do it the way discussed here, using Migration Assistant.

The reason I chose to do a clean install of MacOS 10.14 was to avoid dragging along any stray files, problematic halfway-installations of stuff and whatever. Obviously it'll be a huge timesaver if I restore not only my home-folder but the apps as well, but does this mean I'll also risk dragging along all kinds of things placed all around in oscure folders here and there?
Once a clean install has been done, is the best way to continue with a "clean start" to re-install every piece of software from scratch, or isn't this necessary?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.