Document toolboxDocument toolbox

Migration of SOFiE to a new server

For instance, due to an operating system upgrade (RHEL7→RHEL9), it may be necessary to migrate the SOFiE application from an old server to a new one while preserving the application’s data and configuration. In such cases, we recommend the following procedure:

  • Install a new server with the latest supported operating system (e.g., RHEL9 and its compatible clones).

  • Install the new SOFiE application on the new server. Ensure the same version of the application is installed on both the old and new servers.

  • Install the following on the old server:

    dnf install -y python-psycopg2 rsync
  • Install ansible and generate an SSH key for connecting to the old server on the new server:

    dnf install -y ansible rsync ssh-keygen -t rsa
  • Copy the generated public SSH key /root/.ssh/id_rsa.pub from the new server to the old server’s /root/.ssh/authorized_keys.

  • Enable SSH connection (22/tcp) from the new server to the old server.

  • Download ansible migration playbooks on the new server:

    wget https://install.sofie.cloud/latest/sofie_data_sync.yml wget https://install.sofie.cloud/latest/sofie_migrate.yml
  • Modify the variables in the Ansible playbooks for your specific installation. Particularly, update the line “- hosts: source.server.address” with the actual address of the old server. Then run the playbooks:

    The parameter <source.server.address> must match the address in the playbook line “- hosts: source.server.address”.
    sofie_data_sync.yml - This playbook only synchronizes data in the datastore and is suitable for preparing for the subsequent migration to minimize downtime. It can be run repeatedly, transferring only the data missing on the new server. If the old installation contains a lot of data, this step may take a long time, especially during the first run.
    sofie_migrate.yml - This playbook synchronizes both data and the database (including application configuration). If the previous data sync was run beforehand, it transfers only the missing data, making it faster. It also stops the application on the old server and restarts it on the new one.

  • Test the new installation on the new server to ensure it runs correctly. This will be done using the provisional new FQDN, so the license might not match, and HTTPS will use the local self-signed certificate.

  • Change the FQDN of the new server to the original old FQDN:

  • Update the DNS record to point to the new server, replacing the old server.

  • If using Let’s Encrypt certificates, renew them on the new server:

  • If using a custom certificate, copy it along with its configuration from the old server.

  • (optional - for non-standard installations) Adjust antivirus settings in /etc/sofie/META-INF/microprofile-config.properties. If external scanning is used, manually run the status of these engines and approve the SSH connection if necessary, for example: