The goal is to move from an older Ubuntu to a newer one so that there is no interruption in X-tee traffic. This guide applies to X-Road v7.x.

Install the X-Road software on a clean new Ubuntu up to the initialization step using the official installation guide:

# the most important steps taken from the guide
sudo echo "LC_ALL=en_US.UTF-8" >> /etc/environment
apt install locales software-properties-common 
wget -O - | apt-key add -
echo "deb $(lsb_release -sc)-current main" > /etc/apt/sources.list.d/xroad.list
sudo apt update
sudo apt install xroad-securityserver-ee

  1. It is necessary to copy the backup status of the security server and the unique ID of the security server from the old machine

    # To view an existing ID:
    # The backup file can be obtained from the security server's management interface or from the server's file system directory:
    ls -l /var/lib/xroad/backup/

  2. In the new machine, you need to create X-Road GPG keys and, if a local database is used, also a copy of its connection parameters:

    # On the new machine, create GPG keys with the id you got from the previous step:
    sudo -i -u xroad /usr/share/xroad/scripts/ /etc/xroad/gpghome 'vana_masina_turvaserveri_täispikk_ID'
    # in the case of a local database (the xroad-database-remote package is not installed), copy the database connection setting to the new machine:
    mv /etc/xroad/ /tmp/db.properties_algne

  3. Using the backup file taken from the old X-tee security server, restore its state to the new machine:

    # Restore the old state in the new machine:
    sudo -i -u xroad /usr/share/xroad/scripts/ -f ss-automatic-backup-2023_03_08_031510.gpg -s 'vana_masina_turvaserveri_täispikk_ID' -N -F
    # in the case of a local database, it is necessary to restore the settings for connecting to the database (at the moment, there is the status from the backup file):
    cp /etc/xroad/ /tmp/db.properties_backupist
    cp  /tmp/db.properties_algne /etc/xroad/
    chown xroad:xroad /etc/xroad/
    # Restart services
    service xroad-* restart

    Security Server software repositories
TEST recommend using dev (ee-dev) and test (ee-test) in the X-tee environment to make sure the newer software runs without errors on my system
LIVE software that can be used in ee-dev and ee-test X-tee environments in addition to the EE or production environment