Moving /home Data From Old System To a New Linux System

Copy all files and directories using scp

The SCP (Secure Copy) command is a method of encrypting the transmission of files between Unix or Linux systems. It’s a safer variant of the cp (copy) command.

SCP includes encryption over an SSH (Secure Shell) connection. This ensures that even if the data is intercepted, it is protected

The easiest way to copy all files (including hidden dot files) is as follows using the scp command:

scp -r /home/you/. you@new-system:/home/you
OR
scp -r /home/you/. you@192.168.1.100:/home/you

Recommended Tool

As the name suggests, rsync command is used to sync (or copy) files and directories locally and remotely. One of the important feature of rsync is that it works on “delta transfer algorithm”, means it will only sync or copy the changes from source to destination instead of copying the whole file which ultimately reduce amount of data sent over network.

I recommend using the rsync command – a fast and extraordinarily versatile file copying tool as follows. Login to your old laptop and type:

 

cd /home/you 

rsync -avz * user@newsystem:/home/user/

OR

rsync -avz * user@192.168.1.10:/home/user/

Both the scp & rsync can be used to transfer files/directories but rsync fares a little better when comes to performance. Also rysnc has option to take differential backup which scp lacks.