Security server migration
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: https://x-tee.ee/docs/live/xroad/ig-ss_x-road_v7_security_server_installation_guide.html
# 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 - https://x-tee.ee/packages/live/xroad/xroad.pub | apt-key add -
echo "deb http://x-tee.ee/packages/live/xroad $(lsb_release -sc)-current main" > /etc/apt/sources.list.d/xroad.list
sudo apt update
sudo apt install xroad-securityserver-ee
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:
/usr/share/xroad/scripts/get_security_server_id.sh
# 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/
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/generate_gpg_keypair.sh /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/db.properties /tmp/db.properties_algne
Using the backup file taken from the old X-tee security server, restore its state to the new machine:
Security Server software repositories# Restore the old state in the new machine:
sudo -i -u xroad /usr/share/xroad/scripts/restore_xroad_proxy_configuration.sh -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/db.properties /tmp/db.properties_backupist
cp /tmp/db.properties_algne /etc/xroad/db.properties
chown xroad:xroad /etc/xroad/db.properties
# Restart services
service xroad-* restart
TEST | http://x-tee.ee/packages/test/xroad | we 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 | http://x-tee.ee/packages/live/xroad | production-ready software that can be used in ee-dev and ee-test X-tee environments in addition to the EE or production environment |