- Task
- Version · 6.0.2
- Manage
Back up Liquibase Secure server
Last updated: November 17, 2026
Liquibase Secure server has no backup command, so you back it up with pg_dump, which is already inside its two database containers. Take a backup before every upgrade, and on whatever schedule your organization requires. A complete backup has three parts, and a restore needs all three:
The primary database, which holds projects, pipelines, Governance content, users and the audit log.
The secrets database, which holds the credentials the server stores, encrypted.
The encryption key that reads the secrets database, and your configuration.
Before you begin
You must run every command on the server host, from the deployment directory. The deployment directory is the one that holds
docker-compose.yml.Your account must be able to run
dockercommands.You do not need the database passwords. Each backup command runs inside a database container, where PostgreSQL accepts the connection without one.
Procedure
Stop the API
Stop the API so that nothing changes between the two database backups. Nobody can use the server until you start it again in step 5. The databases keep running, which the backup needs. Do not run liquibase-platform stop here, because it stops the databases too.
docker compose stop apiBack up the primary database
Be sure to replace your_backup_directory with a directory outside the deployment directory. For example, /var/backups/liquibase
If you changed the database user or name, replace postgres after -U with the value of LIQUIBASE_PLATFORM_DB_USER in .env, and postgres after -d with the value of LIQUIBASE_PLATFORM_DB_NAME.
If the primary database is your own PostgreSQL server, the deployment has no db container. Back that database up with your own tools, then continue with step 3.
On 6.0.0 and 6.0.1, the command prints warnings about circular foreign-key constraints on the hypertable, chunk and continuous_agg tables. The backup is complete.
Back up the secrets database
Be sure to replace your_backup_directory with the directory you used in step 2.
If you changed the database user or name, replace secrets_user with the value of LIQUIBASE_PLATFORM_SECRETS_DB_USER in .env, and insights_secrets with the value of LIQUIBASE_PLATFORM_SECRETS_DB_NAME.
Copy the encryption key and your configuration
Copy the secrets directory and the .env file. The secrets directory holds the encryption key and the database passwords, and .env holds your configuration.
Be sure to replace your_secure_directory with a location that is kept apart from the two database backups. Anyone who has a database backup and the encryption key can read every stored credential.
If the deployment runs 6.0.0 or 6.0.1, copy only .env. Those releases keep the encryption key and the passwords in .env, and the deployment has no secrets directory.
cp -a secrets .env your_secure_directory/Note: Without the encryption key, nothing in the secrets database can be read, and no command can recover it.
Start the API
liquibase-platform startCheck the backup files
List the contents of each backup. These commands read the files and change nothing. Each one prints a header that names the database and the PostgreSQL version, followed by one line for every object in the backup.
The output for the primary database starts like this: