I would like to copy/transfer the account of one user (with all files) from one machine to an identical machine. Both machines have identical hardware, they both run Ubuntu 18.04.5 LTS, are connected to the same network, and I have admin rights on both machines.
Of course I could create an account on the new machine, copy the files manually, and then delete the account on the original machine. However, is there a direct way to do this?
I usually prefer the tar approach (also detailed here)
cd /home
tar cf - anAccount | ssh remotehost tar xf - /home/anotherAccount