Open Status
Backup and restore

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:

Shell
docker compose exec -T postgres pg_dump -U status -d status -Fc > BACKUP_FILE

Replace 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:

Shell
docker compose exec -T postgres pg_restore --list < BACKUP_FILE

Replace 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.

  1. On the deployment host, stop the web application and worker:

    Shell
    docker compose stop web worker

    Stop any additional workers and scheduled delivery jobs connected to the same database so they cannot write during recovery.

  2. Restore the database archive:

    Shell
    docker compose exec -T postgres pg_restore --clean --if-exists --no-owner --no-privileges --exit-on-error -U status -d status < BACKUP_FILE

    Replace BACKUP_FILE with the archive path. If the command fails, keep the application stopped and correct the reported database or archive error before repeating the restore.

  3. Restore the matching web-state backup and deployment secrets using your volume and secret-management tools.

  4. Start the web application and worker:

    Shell
    docker compose up -d web worker

    Check 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.