Mac migration using manual rsync
If you are replacing your Mac you will need to consider how to transfer your data content. You could start afresh and create a brand new account on your new Mac or migrate your existing account from your old Mac. If most of your work is stored in Nexus OneDrive Cloud or backed up to CrashPlan (Code42) then you may find it easy to restore your work into a fresh new account on your your new Mac and may find you don't need to migrate your existing account. However if you have lots of data on the old Mac or mail and databases and custom settings that require migration you should transfer your existing account.
We would usually recommend Apple Migration Assistant to transfer as this is the easiest method. However, if for any reason Migration Assistant is not working for you it should also be possible to transfer the account across manually using the rsync from the command line. The account can be copied across directly from the old Mac or it can be transferred via an external hard drive.
Preliminary Task (Create account on new Mac)
On the new Mac login as ladmin local administrator and create a new standard user account with username matching the account on your old Mac.
- On your Mac, choose Apple menu > System Settings, and open 'Users & Groups' and click 'Add Account'.
- Create a new standard user account with username matching the account on your old Mac.
- Do not login to this account yet. Proceed to either 'NETWORK RSYNC ACCOUNT MIGRATION' or 'EXTERNAL HARD DRIVE RSYNC ACCOUNT MIGRATION' below.
Network rsync account migration
Step 1 (Enable remote login on old Mac)
Follow the instructions at https://support.apple.com/en-gb/guide/mac-help/mchlp1066/mac to enable ssh login on old laptop. Required for rsync. Remember to switch this off at the end of this procedure.
Step 2 (Direct network rsync transfer)
- Ensure both Macs are on the same network and can contact each other
- Ensure old Mac is at the login prompt without any user being logged in.
- Login with ladmin account on new Mac and open a Terminal on the new Mac and switch to root using 'sudo su - ' .
- Test login to old Mac using ssh user@oldmac . Accept the ssh key fingerprint and login. This needs to be done once for rsync to work. Logout from old mac by typing exit
- Begin rsync transfer. As an example for a user with username unit1234 one would use
rsync -avHE -e 'ssh -c blowfish' firstname.lastname@example.org:/Users/unit1234 /Users(please check the output for errors and repeat again until all errors are resolved).
Step 3 (Disable remote login on old Mac)
Reverse the steps you performed previously following https://support.apple.com/en-gb/guide/mac-help/mchlp1066/mac to disable ssh login on old laptop. Leaving remote login enabled could be a security risk.
EXTERNAL HARD DRIVE RSYNC ACCOUNT MIGRATION
You will need an external drive that has sufficient capacity and it will need to be formatted for Apple File System (APFS). Use the following page for guidance if you need to format the drive. Take care and make sure your format the correct drive!
Step 1 (Create backup on old Mac)
To create backup of home directory from old Mac connect the external drive to old Mac and create a directory 'Migration' and create an rsync backup from the terminal whilst logged in with a different account to the target account that has admin rights.
Open a Terminal on the old Mac and switch to root using 'sudo su - ' .
Here is an example enter command that presumes the external drive is mounted under '/volumes/My Passport for Mac' and we want to get the account unit1234 .
rsync -avHE /Users/user1234 /Volumes/My Passport for Mac/Migration/
Step 2 (Restore backup to new Mac)
Connect external drive to new Mac.
Login with ladmin account on new Mac and open a Terminal on the new Mac and switch to root using 'sudo su - ' . Run rsync with command below. It may take several hours
rsync -avHE /Volumes/My Passport for Mac/Migration/user1234/* /Users/user1234
When rsync completes check permissions are correct.
chown -vR user1234 /Users/user1234
Restart Mac and test login.