X-Road Security Server backup and restore: what to protect before you need it
A Security Server backup is one part of the recovery set, alongside the database and message log data, which must be backed up separately. A restore is only proven once it has been tested, so treat an untested backup as an assumption. For an operations lead bringing a failed or rebuilt Security Server back into service, the useful question is whether the configuration, database and message log can be restored together and checked against each other. Start with an inventory of everything that holds Security Server state, confirm which items your backup job actually captures, and record who owns each one and where its copy is kept.
Plan this before the first production member depends on the server, and rehearse it before the first failure. A production Security Server needs a tested restore path for three situations: a failed host that must return to service, a rebuild onto new infrastructure, and an upgrade that could leave the server in a state you need to undo. Audits add a fourth: an assessor may ask how you recover the server and when you last proved it. If the server uses hardware security modules through PKCS#11 drivers, confirm with your vendor and the user guide where signing keys live and whether they come back with the backup or must be recovered through the token itself. Those answers belong in the runbook before the incident.
Use the official X-Road Security Server user guide for the exact backup and restore procedures, including the UI and command line steps, and check them against the release you run. Your runbook should translate those steps into your environment: the database host, the message log location, the server's network ports and the account that will perform the restore. Then run a restore onto a test server at least once before you need it, and record the time it took and what you had to fix by hand. Those notes are the evidence an operations lead needs when someone asks whether the backup is enough.
Which backup and restore methods fit your team
This table compares the five ways an operator can back up or restore a Security Server: the admin UI, the automatic daily backup, the command line, and separate copies of the database and message log. Read each row for who runs the method, what it needs in place, and what to check in the user guide before relying on it. The main takeaway is that the database and message log copies belong in the same recovery plan as the server backup.
| Method | When it fits and who runs it | What it depends on | Confirm before relying on it |
|---|---|---|---|
| Manual backup from the admin UI | Ad hoc copy before a change or upgrade, run by an operator whose role the user guide allows to create backups. | Admin UI on TCP 4000 from the internal network, and an admin account with backup rights. | Which role creates backups, what the file contains, and where it is written. |
| Automatic daily backups | Routine recovery point with no manual step, set up once and checked regularly by the operator team. | The scheduled service running on the server and storage for the backup files. | Schedule, retention period, file location, and that a backup is produced on each run. |
| Restore from the admin UI | Recovery when the admin UI still responds, run by an operator with restore rights on the same or a rebuilt server. | A working admin UI, a backup file, and a Security Server version that the backup supports. | Whether the backup must match the software version, and the server state after restore. |
| Restore from the command line | Recovery when the admin UI is down or during a rebuild, run by a system administrator with shell access. | Shell access on the server, the backup file, and the X-Road package version the backup requires. | Exact restore steps and arguments in the user guide, rehearsed on a non-production server first. |
| Separate PostgreSQL and message log backup | Covers the database and message log data, which the topic guidance says to back up separately, run by the database team with the logging policy owner. | Access to the PostgreSQL instance, local or remote, and the message log retention settings in use. | Which data the server backup leaves out, and the database backup method your team supports. |
| Coordinated restore of database and server | Brings the database and Security Server back to matching states, run by the same team that owns both backup sets. | Both backup sets taken and recorded together, with access to both systems during recovery. | Whether the user guide sets a required restore order and post-restore checks. |
What an X-Road Security Server backup contains and leaves out
Plan a restore as a rebuild from several sources, because the Security Server backup covers the X-Road configuration and little else. The data outside it is the message log and the PostgreSQL database that the Security Server requires. That database can run locally on the same host or on a remote server, including managed services such as AWS RDS and Azure Database for PostgreSQL. Confirm where your database runs, who owns its backups, and whether its recovery point can be matched to the moment the Security Server backup was taken. If the two drift apart, the restored server can hold configuration that does not match its message history.
Several things stay outside the backup and need their own protection plan. Operating system configuration, including local accounts, SSH settings, time synchronization and installed packages, must be rebuilt or restored from your host standards. TLS material for the admin UI and information system connections, and the signing and authentication keys, must stay under your own key management controls. If you use a hardware security module, record the PKCS#11 driver, the xroad-addon-hwtokens package setup and the token configuration, because the restored server needs them to reach its keys. Finally, document the host network settings, including the ports the Security Server uses: TCP 5500 and 5577 from external networks, and TCP 4000 with 8080 or 8443 from internal networks.
Before you rely on any inclusion list, open the X-Road Security Server user guide for the exact version you run. The current release is 7.8.3, and 7.7.4 and 7.6.5 are also supported, so the guide for your installed version is the authority on what a backup contains. Ask your team to record the installed version with each backup, run a test restore on a separate host, and compare the restored configuration with the source before you treat the backup as usable. Repeat that check after each upgrade, because the list is tied to the version.
How the parts of a Security Server recovery set fit together
The recovery set starts on the Security Server host, which holds the PostgreSQL database, the message log data and any PKCS#11 hardware token that protects its keys. The backup archive leaves that host and lands in backup storage, on the other side of a trust boundary, so it needs its own access controls. A restore onto a target host needs three inputs: the backup archive, the database and the message log data. The database and message log are backed up separately, so check that each has its own copy and restore test before you rely on the archive alone. Confirm in your runbook how a hardware token is attached to the restore target.
General illustration, not a deployment specification of the recovery set.
How to set up automatic backups and prove a restore works
This sequence turns an automatic Security Server backup into a backup you have tested. You confirm the version and platform, locate the database and message log, enable the daily backup, copy it off the host, record the backup times, and restore into a test environment. The result is evidence that a restored Security Server registers and shows the expected configuration.
Confirm the installed version and platform
Repeat this on every Security Server, since each host has its own configuration to back up. Record the installed X-Road package version and the operating system release, then compare both with the supported lists. X-Road 7.8.3, 7.7.4 and 7.6.5 are the supported versions, and the Security Server runs on Ubuntu Server 22.04 and 24.04 LTS (x86-64) or Red Hat Enterprise Linux 8 and 9. Take the exact command for printing the version from the Security Server user guide for your installed version. Done when the version and OS are written in your change record and both match the supported lists.
Locate the database and message log
Find where each Security Server keeps its PostgreSQL database and its message log before you change any backup setting. PostgreSQL can run locally on the host or remotely, including managed services such as AWS RDS and Azure Database for PostgreSQL. If the database is remote, its backup is usually a separate job owned by the team that runs that service, so get the schedule and owner in writing. Confirm the message log location and its retention in the user guide and your environment. Check: for each node, you can name the host or service, the database, the message log path and the owner of each.
Enable or confirm the daily automatic backup
Open the admin UI, which listens on TCP 4000 from internal networks, and find the backup settings described in the user guide. Confirm that the automatic daily backup is enabled, and check that the admin account you use has the role the guide requires for changing backup settings. Note the schedule and the destination path the UI shows, and flag any destination you do not control. If the guide offers a manual trigger, use it once to produce a test backup. Check: a new backup file appears in the backup location on the host, and its timestamp matches the schedule shown in the UI.
Copy the backup off the server
Move a copy of each backup file to storage outside the Security Server host, such as a backup system or storage location your organization controls. Transfer the file itself over an encrypted channel and store it with access controls that match the sensitivity of the configuration it holds. Record the destination and the list of people or services that can read it. Check: compute a checksum for the file on the host and on the off-host copy, confirm the two match, and confirm the copy is present in the destination without any dependence on the original server.
Record backup and database backup times together
Write down the time of each Security Server backup next to the time of the matching database backup and the message log copy. These are produced by separate processes, so their times can drift apart, and a restore that mixes mismatched sets may leave configuration and database out of step. Keep the record in your runbook or change system with the host name, schedule owner and file names. Run the consistency checks described in the user guide for the same backup set. Check: for the latest backup, you can point to one backup file, one database backup and one message log copy whose timestamps fall in the same window, and the team that would perform a restore can read the record.
Restore into a test environment and verify
Restore the latest backup into a separate test Security Server that is isolated from production members, using the UI or command line method for your installed version as described in the user guide. Restore the database backup that matches the chosen backup time, and follow the guide for the order of database and configuration restore. Start the test instance and compare what it shows with your record: the instance identifier, member and Security Server names, and the services and access rights. Check: the restored instance starts, shows the expected configuration in the admin UI, and passes the consistency checks. Keep the test result and your notes as evidence of the restore.
When to run consistency checks on a Security Server backup
Routine checks confirm that the latest automatic backup is still a usable set: the configuration backup plus the database and message log data that belong with it. The security or platform team that owns the Security Server should run them on a cadence set in its own operating procedures. Set the frequency and pass criteria from the Security Server user guide and your own change process.
- Backup presence and age: confirm the newest backup exists and was written after the most recent configuration change.
- Database and message log pairing: confirm the backup has database and message log copies from the same time window, since a backup that matches one but not the other may not restore cleanly.
- Storage and access: confirm the copy sits off the Security Server host and that only named administrators can read it.
- Failures and exceptions: record any failed, skipped or partial backup and the person who acted on it.
Keep the backup file names and timestamps, the check output, the operator name and any exception ticket, and confirm the record covers every item for the period.
Run a consistency check on a fresh backup taken just before an upgrade, so you hold a known-good rollback point from the release you are leaving. The platform team should perform the check and the security team should review the result before the change window opens. Confirm the target release against the X-Road releases page and the upgrade procedure for that release, because the software that reads the backup changes during the upgrade.
- Fresh backup first: take a new backup after the last configuration change and run the check against that file, not the previous scheduled one.
- Version record: note the current release and the target release, and confirm the target is on the supported list, which showed 7.8.3, 7.7.4 and 7.6.5 at the time of writing.
- Matching database and message log copies: capture the database and message log at the same point as the configuration backup and record the time window for all three.
- Rollback rehearsal: restore the pre-upgrade backup on a test host and run the same check there before the production change.
Keep the pre-upgrade check output, the version record, the rehearsal result and the change approval together so the rollback decision can be traced.
A check after a restore confirms that the Security Server came back as the backup it was built from, with its configuration, database and message log in step. The person who ran the restore should perform the check, and a second administrator should review it where your change process requires that. Complete it before the server carries live traffic, because mismatched data sets are harder to diagnose once the server is serving requests.
- Configuration against the source backup: compare members, services, keys and certificates on the restored server with the backup record you restored from.
- Database and message log alignment: confirm both data sets come from the same backup window. If they do not match, stop and resolve the mismatch before traffic resumes.
- Diagnostics: use the diagnostics view to check global configuration, timestamping and OCSP status on the restored server.
- Connectivity: confirm the message exchange and OCSP ports listed in the installation guide accept traffic from the networks they should.
Keep the restore log, the check output, the diagnostics results, the restore time and the approval to go live in one record.
A change to the host, database or token means the backup describes an environment that no longer exists in the same form, so the check confirms the backup still restores onto the new target. The platform team should run it, with the security team responsible for signing keys and token access. Run it on a test target where possible, before the change is scheduled, so a failed check does not become an outage.
- Platform support: confirm the new host runs a supported operating system and meets the memory and disk minimums in the installation guide.
- Database and message log reachability: confirm the database, whether local or remote including managed PostgreSQL, accepts connections from the new host and holds the restored data, with the message log copy from the same backup window.
- Token and key access: for hardware security modules through PKCS#11 with the
xroad-addon-hwtokenspackage, confirm the token is visible to the host and the keys referenced in the configuration are present. - Addresses and firewall rules: confirm host addresses and firewall rules still allow TCP 5500 and 5577 from external networks, and TCP 4000 and 8080 or 8443 from internal networks.
Keep the platform inventory from before and after the change, the database and token check output, the firewall change record and the approval from both teams.
Protecting X-Road Security Server backup files and keys
Backup files and keys decide who can rebuild your Security Server and who can read its configuration. The five cards cover what a backup holds, who can restore it, how logins to those accounts are protected, where copies are stored and how token-held keys are handled. Each card names a setting to check and the vendor document to confirm it against.
Backup files hold sensitive configuration
A Security Server backup captures configuration that defines your member identity and service connections, so anyone who reads the file learns how your exchange is built. Treat each backup as confidential material from the moment it is created. Check the user guide to see what the file includes and what it leaves out, then record the answer in your data classification so the backup inherits the right handling rules. Confirm with the vendor documentation whether the file is encrypted when it is created.
User guideRestore rights follow admin roles
The Security Server defines five user roles, including Security Officer and System Administrator, and admin users authenticate through PAM. Whichever role can start a restore can rewrite the server's configuration, so restore rights belong to a small, named group. Check the user guide for the role that performs backup and restore actions, and confirm that no shared or generic account can reach it. If you integrate LDAP through SSSD, review the group-to-role mapping, because a broad LDAP group can grant restore rights without anyone noticing.
Lockout and password settings
The hardening guide recommends locking an account for 15 minutes after 3 failed logins and requiring passwords of at least 16 characters. These settings matter most for accounts that can restore a backup, because a guessed password there leads to the full configuration. Confirm in the hardening guide where the lockout is configured on your distribution, then verify that the live setting matches the documented value. Test a lockout on a non-production server before you rely on it.
Hardening guideBackup storage location and access
Decide where backup files are written, who can read them and whether copies leave the server. A file readable by any local account exposes the same configuration as a file on a shared network folder, so set owner, group and permissions on the backup directory and on every copy. Keep at least one copy in a store that the server's administrators cannot silently change. Ask the vendor documentation for the default backup location, the permissions it sets and whether the backup process can write to external storage. Record who reads or copies each backup.
Hardware token and key material
Security Server keys can sit on a hardware security module that PKCS#11 drivers reach through the xroad-addon-hwtokens package, with RSA and EC keys supported. A configuration backup may not contain key material held on a token, so a restore onto new hardware can fail even when the file is intact. Confirm with the user guide and the installation guide which keys the backup covers, and document the token serial, PIN custody and the steps to rebind keys. Test a restore on a spare server with a token of the same kind.
Installation guideBack up the database and message log on their own schedule
Treat the PostgreSQL database and the message log data as separate recovery sets, each with its own schedule, owner and restore test. The Security Server configuration backup does not hold the exchange history, so a server rebuilt from that file alone comes back with its configuration but without the messages it handled. Before you set any schedule, read the backup guide for what the configuration backup includes and what it leaves out, and copy that list into your runbook. For each part, decide who takes the copy, where it is stored, how long it is kept and how the restore is verified. A database restored from an older point than the configuration file can leave the two out of step, so the database must be part of the plan from the start.
When the database is a managed service such as AWS RDS or Azure Database for PostgreSQL, the provider usually runs the database backups, so your team's job shifts toward confirming them. Check the automated backup retention window, whether point-in-time recovery is enabled, and whether a restore creates a new instance with a new endpoint, which means updating the database connection in the Security Server after recovery. Confirm who is authorized to start a restore, how long a restore takes in your region and whether copies are kept in a second region. Your team still owns the message log copies and the configuration backup, because the provider's snapshots know nothing about them. Test each restore path at least once so that the first real recovery is not the first time anyone has run it.
Align timing so the three parts describe the same moment. Schedule the configuration backup, the database backup and the message log copy in one window, record the time each one finished and keep those timestamps with the recovery set. If the managed database supports point-in-time recovery, set the restore target from the configuration backup's finish time so the database lands on the same moment. Then settle the restore scope before an incident. Restoring the configuration alone is faster and simpler, but the server returns without the exchange history for the gap. Restoring the full exchange history needs a matching database and message log, takes longer and keeps more evidence under protection. Retention for message logs and evidence depends on your legal and contractual obligations, so confirm the period with your compliance owner before you set any value.
Limits to confirm before you rely on a restore
Backups only help if they restore onto the hardware, versions and key material you will have during an incident. The cards below list the limits to put to the X-Road project (NIIS) or test in a non-production Security Server before you depend on a restore.
Backup and restore version match
The supported release lines are 7.8.3, 7.7.4 and 7.6.5, but that does not confirm that a backup from one line restores onto another. Ask NIIS whether a backup taken on one release restores onto a newer or older Security Server, and whether a 7.x backup can be restored onto X-Road 8 beta. In a test environment, restore a backup onto the exact target version you plan to run, then confirm the configuration loads and members can still exchange messages.
X-Road releasesRestore on a different host
A restore onto new hardware, a rebuilt virtual machine or a changed IP address is a different case from an in-place restore. Ask whether the backup carries the server's hostname, address and certificate settings across, and which values you must edit by hand afterward. In a test environment, restore onto a host with a different address and check the admin UI, the message exchange port (TCP 5500) and the registration state before any failover plan relies on it.
Token and key material
Security Server keys may sit in the software token or in a hardware security module reached through a PKCS#11 driver, which X-Road supports through the xroad-addon-hwtokens package with RSA and EC keys. Ask whether the backup includes key material or only references to it, and whether a restore needs the same token or HSM partition. In a test environment, restore to a host with an empty token, record exactly what fails, and settle the key recovery procedure before you need it.
Installation guideCluster and HA restore path
A Security Server in a cluster or behind a load balancer may need a different restore sequence from a single server. Confirm which node is restored first, whether a backup from one node restores the whole cluster or each node needs its own backup, and whether the other nodes must be stopped or resynced. In a test environment, rebuild a two-node setup from backups, then confirm traffic reaches both nodes and that their configuration matches.
What the backup leaves out
The database and message log data are backed up separately, so a configuration restore alone does not restore them. The database may be a local PostgreSQL install or a remote service, including managed options such as AWS RDS or Azure Database for PostgreSQL, which keep their own recovery settings. Ask NIIS for the exact contents list of a backup, then restore into a clean environment and compare the database and message log state with the source.
Security Server user guideRestore testing frequency
Ask the X-Road project for its guidance on how often restores should be tested, and whether that guidance changes with the release line you run. The 7.8.0 release is the last new-feature release of X-Road 7, and the length of the maintenance period beyond 2026 has not been decided, so a runbook written today may outlive its tested version. Schedule a fixed restore test, repeat it after each upgrade, and record the release, backup time and restore duration each time.
NIIS 7.8.0 announcementQuestions teams ask before they plan backup and restore work
How much does a Security Server backup and restore project cost?
Cost follows the written scope, and DeployOpen does not publish a price list, so the quote is built from the scope you agree. Four inputs drive the effort:
- Number of Security Servers, since each server needs its own backup, restore steps and checks.
- Database hosting model, whether PostgreSQL runs locally or as a remote or managed service such as AWS RDS or Azure Database for PostgreSQL, because backup and access responsibilities change.
- Token and high availability setup, including hardware security modules through PKCS#11 and any clustered servers that must be restored in a set order.
- Restore testing scope, from one documented test restore to repeated rehearsals across environments.
The project itself is one-time work. Ongoing support, upgrades and continuous testing are separate retainers, so ask for them as their own line items.
How long does backup and restore work for X-Road take?
Duration depends on the written scope and on how quickly your environment can accept change, so no fixed timeline applies to every deployment. The main factors are the number of Security Servers, whether the database is shared or separate, how many change windows your operations team can release, and how many restore rehearsals the scope includes. Work that waits on token or hardware security module access, or on database administrators who must approve changes, adds calendar time even when the technical steps are short. Before you plan dates, confirm the test environment, the production change process and the people who sign off each step. Tie each milestone to the input the client provides, so the schedule moves only when a stated input is late.
What does our team need to provide for backup and restore?
Your team provides access, change windows, database administrators and a retention decision. Each one is needed before the work can move forward:
- Administrative access to every Security Server, its database host and the token or hardware security module that holds its keys, agreed with your security team in advance.
- Change windows for test restores and any production change, booked with operations so the work does not wait on an unplanned slot.
- Database administrators who confirm the backup schedule, grant the access the restore needs and review restore results.
- A retention decision: how long backups are kept, where they are stored and who may read them. DeployOpen can document the options, but your organization owns that policy.
Raising these items at kickoff keeps the schedule tied to decisions your team controls.
Can our in-house team back up X-Road using the official guides?
Yes, a team with Linux, PostgreSQL and X-Road administration skills can work from the official guides, but the guides describe procedures, not your design choices. Start with the Security Server user guide and confirm it matches the release you run, since the current release is 7.8.3 and the supported versions are 7.8.3, 7.7.4 and 7.6.5. In-house teams still need to decide retention, design the database backup, set up a separate restore environment, handle token and high availability steps, and write a runbook that another operator can follow. Count those decisions and the test time before you choose between an in-house team and a partner.
Why should a Security Server restore be tested before go-live?
Yes, run at least one full restore into a separate environment before the Security Server goes live, because a backup that has never been restored is unproven. The test should follow the documented steps exactly and record every deviation. Confirm that your restore path also covers the database and message log data, since those are backed up separately, and that keys and tokens reattach correctly. Then check that the restored server starts its services and completes test message exchanges with a known counterpart. Repeat the test after any change to the database hosting model, token setup or X-Road version, and keep the results with the runbook so the next operator knows what passed and when.
What should a written quote for this work include?
A written quote should list scope, deliverables, assumptions and client responsibilities, so that each cost line maps to work you can check. Ask for:
- The Security Servers, X-Road release and environments in scope, including which are production and which are test.
- The database hosting model and which backup tasks are included or left to your team.
- Token, hardware security module and high availability handling, with the nodes and restore order named.
- The number of test restores, the environments they run in and the pass criteria for each.
- Deliverables such as a runbook, backup procedure, handover session and any evidence your compliance team needs.
- Client inputs, change windows, exclusions, and whether ongoing support or retesting is a separate retainer.
Most engagements are fixed-scope, so any item missing from the written quote should be treated as unagreed until it is added.
What does a Security Server backup leave out?
A Security Server backup does not cover everything the server depends on, so the database and message log data need their own backup plan. Treat the backup as one part of your recovery plan. Confirm the exact contents and exclusions for your release in the Security Server user guide before you design the schedule. Then map each item the backup leaves out to an owner, a method and a restore test, including the PostgreSQL database, the message log, and any files or keys your deployment keeps outside the backup. Record where each one is stored, how long it is kept and who can read it. A gap found during an incident is much harder to close than one found during planning.
How DeployOpen scopes and delivers Security Server backup and restore
DeployOpen plans, implements, backs up, documents and supports self-hosted open-source platforms inside your own infrastructure, and X-Road Security Server backup and restore follows the same written-scope process. The work starts by agreeing which Security Servers, databases and message log data are in scope, then builds and tests the backup and restore path in your environment. Engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work begins.
How we scope
- The written scope lists which Security Servers, the PostgreSQL databases and the message log data are covered.
- It records where backup copies are stored, who can access them, and which encryption keys are used.
- Engagements are fixed-scope, and the scope and deliverables are agreed in writing before work starts.
How we build
- Map the backup contents against your Security Server version, noting what the backup includes and what it leaves out.
- Configure the automatic daily backup and the separate database and message log backups in your own infrastructure.
- Rehearse restores from the UI and the command line on a non-production Security Server before go-live.
How we hand over
- Documentation covers the backup schedule, storage locations, restore steps for each path and the consistency checks to run.
- Handover can include a restore test record showing which backup was restored, when, and whether the checks passed.
- Operators are walked through the runbook, and the handover list names owners for backup storage and access.
How we support
- Ongoing support is available as a retainer, which can cover backup and restore checks after X-Road upgrades.
- Re-run restore tests after each X-Road release upgrade, since the restore steps may change with the version.
- Confirm with NIIS release notes which backup format each supported release uses before planning changes.

