- Task
- Version · 6.0.2
- Manage
Restore Liquibase Secure server from a backup
Last updated: November 17, 2026
A restore returns Liquibase Secure server to the state it was in when the backup was taken. It replaces everything in both databases, so any change made after the backup is lost. You can restore onto the deployment the backup came from, or onto a new installation when the original host is gone.
Before you begin
You must have all three parts of a backup: the primary database file, the secrets database file, and the copy of the
secretsdirectory and.env. To create them, see Back up Liquibase Secure server.The server must run the same release the backup was taken from. To check, run
liquibase-platform status.The server must be installed and running. To restore onto a new host, first install the same release there. See Install Liquibase Secure server. You do not need to create an administrator account, because the restore brings the accounts back.
You must run every command on the server host, from the deployment directory. The deployment directory is the one that holds
docker-compose.yml.
Procedure
Stop the API
Stop the API so that nothing is connected to the databases. Nobody can use the server until you start it again in step 5.
docker compose stop apiRestore the primary database
The first command deletes the current primary database and creates an empty one. The second loads the backup into it.
Be sure to replace your_backup_directory with the directory that holds the backup files.
If the backup is from 6.0.0 or 6.0.1, run these four commands instead. Those releases run the primary database on TimescaleDB, which needs one command before the restore and one after it.
The pg_restore command prints nothing when it succeeds.
Restore the secrets database
The first command deletes the current secrets database and creates an empty one. The second loads the backup into it.
(Optional) Put back the encryption key on a new installation
Skip this step when you restored onto the deployment the backup came from, because its encryption key is already in place.
A new installation generates its own encryption key, which cannot read the secrets database you restored. Replace the new installation's encryption key and authentication secret with the ones from your backup.
Be sure to replace your_secure_directory with the location that holds your copy of the secrets directory and .env.
Copy only these two files. A new installation also generates its own database passwords, and the databases keep those. If you copy db_password or secrets_db_password from the backup, the API cannot connect to the databases and does not start.
cp -p your_secure_directory/secrets/encryption_key your_secure_directory/secrets/auth_secret secrets/If the server runs 6.0.0 or 6.0.1, the deployment has no secrets directory. Open the deployment's .env file and replace the values of LIQUIBASE_PLATFORM_ENCRYPTION_KEY and LIQUIBASE_PLATFORM_AUTH_SECRET with the values from the .env in your backup. Leave every other line as it is.
Start the API
liquibase-platform startConfirm the restore
Check that every service is healthy.
liquibase-platform statusThen sign in to the console with an account that existed when the backup was taken, and confirm that the projects and database connections from that time are listed.