Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Take a backup of the Central Servers.
  2. Update Central Servers to version 6.23.0 (or later). See Central Server High Availability Installation Guide for instructions.
    • Verify that center.ha-node-name is configured in /etc/xroad/conf.d/local.ini (on each server).
  3. Create the destination database using DB super-user privileges:

    Code Block
    psql --host=<host> --username=<super-user, e.g. postgres> <<EOF
    create user centerui password '<password>';
    grant centerui to postgres; -- required e.g. by AWS RDS because the managed super-user does not have full privileges
    create database centerui_production owner centerui;
    \c centerui_production
    create extension hstore;

  4. Stop Central Servers.
    • Alternatively, one can leave the servers running but any modifications to the configuration (e.g. new Security Server registrations) during the upgrade are lost.
  5. Take a dump of the Central Server database:
    • Note the destination database version (e.g. PostgreSQL 10.10).
    • If necessary, install a version of the postgresql-client package that has the same major version as the destination database (e.g. postgresql-client-10).
    • (warning) Use the pg_dump version that has the same major version as the destination database. Do not use pg_dump from the BDR version of PostgreSQL.

      Code Block
      /usr/lib/postgresql/<major version>/bin/pg_dump --host=localhost --username=centerui --no-privileges --no-owner --schema=public --exclude-table=xroad_bdr_replication_info --dbname=centerui_production --format=c -f center.dmp

  6. Restore the dump to the new database:
    (warning) Use pg_restore that has the same major version as the destination database.

    Code Block
    /usr/lib/postgresql/<major version>/bin/pg_restore --list center.dmp | sed '/FUNCTION public get_xroad_bdr_replication_info()/d' >center.list
    /usr/lib/postgresql/<major version>/bin/pg_restore --host=<host> --username=centerui --dbname=centerui_production --no-owner --single-transaction --use-list=center.list center.dmp
    psql --host=<host> --username=centerui --dbname=centerui_production -c "select fix_sequence();"

  7. Update the configuration file /etc/xroad/ with information about the new database.
  8. (Re)start Central Servers.
  9. If the local PosgreSQL is not used by other applications, stop the local instance and prevent it from starting:

    Code Block
    sudo systemctl stop postgresql
    sudo systemctl mask postgresql