8

I just got a new laptop and I'm wanting to transfer (preferably everything) from my old one to the new one. The old one is running Lubuntu 18.04 64 bit and the new one is running the exact same. I really want to avoid taking the laptops apart to get the drives out and then copying them so would anyone know a good free (as in price) drive copier that I could use?

1

2 Answers 2

19

If the laptops are in the same network, you can use rsync to copy files via ssh.

From the new laptop you can run something like this if the username is the same on both computers.

rsync -av -e ssh user@old_laptop:/home/user /home
  • replace user with the actual username
  • replace old_laptop with the old laptops hostname (run hostname on your old laptop to see the hostname).

This will copy the whole user's home directory to your new laptop.
If you issue the same command again, it will only copy changes.

Note: This command will not copy and global settings made outside your home, e.g. in /etc. Also some programs might write to /var. You can of course change the command to include/use these directories. You will then need to run using sudo.


If you have different user name, use this:

rsync -av -e ssh old_user@old_laptop:/home/old_user/ /home/new_user

This will copy the contents of the user directory to your new laptop (note the trailing / behind old_user).


  • Add --delete to remove files on your new computer that are not on your old computer.
  • Add -z to use compression if your network speed is slow, e.g. if you copy via internet.

Your old laptop needs openssh-server installed.

2
  • This will copy the user's home directory, which is good, but it will not transfer everything, for example not global settings (for example those stored in /etc) and not installed program packages.
    – sudodus
    Aug 30, 2018 at 14:17
  • 3
    I just assumed that OP wanted to copy personal files, but you're right. I pointed that out in the Answer. Thanks!
    – pLumo
    Aug 30, 2018 at 14:25
4

Clonezilla

If the computers are similar enough, a cloned copy of the drive in the old computer will work in the new computer. Things to consider are graphics chip/card and wifi chip/card. Most things are probably working with built-in linux drivers.

I would take the the drive in the old computer out of the computer and put it into the new computer and test if/how it works. But that's me. I understand that you want another solution, and I suggest that you use Clonezilla to

  • make an image the whole drive of the old computer to an image in an external drive,
  • restore from the image to the drive of the new computer,
    • the target drive (in the new computer) must be at least as big as the source drive (in the old computer), not one single byte smaller for this method to work.

Links

Clonezilla web site

use dd to back up transfer hard driver image

Fastest way to copy HDD

CloneZilla: HDD Cloning - Dual Boot (Windows + Linux)

You must log in to answer this question.