Backup and restore
Back up a self-hosted database and persistent state, then check the recovered installation.
A self-hosted Status backup needs both PostgreSQL data and the persistent
web-state volume. The database contains configuration and history; web-state
contains the secrets needed to decrypt stored credentials, the setup state, and
locally stored profile pictures. See Self-hosting
for the persistent volumes.
Create a backup
For the bundled Docker Compose deployment, run these commands on the deployment
host, in the directory containing docker-compose.yml. The postgres service
must be running. Create an access-controlled backup directory first.
To write a PostgreSQL custom-format archive, run:
docker compose exec -T postgres pg_dump -U status -d status -Fc > BACKUP_FILEReplace BACKUP_FILE with an unused path in the backup directory. Shell
redirection overwrites an existing file. Confirm that the command exits
successfully before retaining the archive.
Back up web-state using your volume or filesystem backup tools. If profile
pictures use S3-compatible storage, include that store in your backup policy.
Back up environment secrets separately. Store backups in encrypted storage with
restricted access and off-site replication.
Verify an archive
To check that PostgreSQL can read the archive catalog, run:
docker compose exec -T postgres pg_restore --list < BACKUP_FILEReplace BACKUP_FILE with the archive path. A successful command prints the
archive catalog. This checks readability; rehearse a full restore in an isolated
installation to confirm that the database and saved encryption keys work
together.
Restore
Restoring replaces objects in the target database. Rehearse against an isolated
installation before restoring a production deployment. These commands use the
bundled Compose database named status.
-
On the deployment host, stop the web application and worker:
docker compose stop web workerStop any additional workers and scheduled delivery jobs connected to the same database so they cannot write during recovery.
-
Restore the database archive:
docker compose exec -T postgres pg_restore --clean --if-exists --no-owner --no-privileges --exit-on-error -U status -d status < BACKUP_FILEReplace
BACKUP_FILEwith the archive path. If the command fails, keep the application stopped and correct the reported database or archive error before repeating the restore. -
Restore the matching
web-statebackup and deployment secrets using your volume and secret-management tools. -
Start the web application and worker:
docker compose up -d web workerCheck login, monitor configuration, incidents, maintenance, and status pages before directing traffic to the recovered installation. Confirm that workers reconnect on the Agents page and that configured checks produce results.
Per-organization portability
An organization admin can download /api/a/<org>/organization/export. The
versioned JSON package contains organization records and personal data; protect
it as a secret. A database restore replaces the whole installation and is not a
per-organization import procedure.
To transfer monitor configurations through the console, use Import, export, and clone monitors.