Computer migration

Copying files

This brief guide describes steps to transfer your home files from an old computer to a new one.

On “source” computer

  1. Setup ssh-server on the ‘old’ computer. This enables the ability to copy files over the local network. Launch a terminal emulator and run the following command:

    sudo apt install openssh-server
    
  2. Obtainthe IP address of the ‘old’ machine. Open Settings > Network > Network Settings. Note the IPv4 Address (e.g. 192.168.1.182).

On “destination” computer

  1. Proceed through the normal install. Creating users, passphrases, etc.

  2. After installation and configuration, login, open up a terminal emulator and type:

    rsync -avx <username>@<ip-address>:~/ ~/
    

    In my case it was:

    rsync -avx todd@192.168.1.182:~/ ~/
    

    Note

    There were issues getting gpg working on the ‘new’ computer from running rsync -avx and the .gnupg keyring directory. To successfully export/import, follow these steps: https://access.redhat.com/solutions/2115511 | https://access.redhat.com/solutions/2115511

Copying applications

This brief guide describes the steps migrate applications from one computer to another one.

Note

apt-clone is an alternative method that works within Debian GNU/Linux, but not derivatives such as PureOS.

On “source” computer

  1. Create the package list

    dpkg --get-selections > /tmp/selections.list
    apt-mark showauto > /tmp/auto.list
    
  2. Get the address of the ‘old’ machine. Open Settings > Network > Network Settings. Note the IPv4 Address (e.g. 192.168.1.182).

On “destination” computer

  1. Copy over the “source” computer clone files

    scp <user>@<ip-address>:/tmp/*.list /tmp
    

    In my case it was:

    scp todd@192.168.1.182:/tmp/*.list /tmp
    
  2. Update the package list before updating applications

    sudo apt update
    
  3. Upgrade to the latest base system first

    sudo apt upgrade
    
  4. Install all the packages

    sudo /usr/lib/dpkg/methods/apt/update /var/lib/dpkg/
    sudo dpkg --set-selections < /tmp/selections.list
    sudo apt-get dselect-upgrade
    sudo xargs apt-mark auto < /tmp/auto.list