Skip to main content
What to back up, how often, and how to restore. Observal has three persistent stores with very different loss profiles.

What matters, in order

Always back up apidata and pgdata together. Backing up one without the other leaves you in a broken state after restore.

Backup cadence

Postgres backup

Use pg_dump inside the running container:
Restore into a fresh DB:

JWT key backup (apidata volume)

The API container mounts the apidata volume at /data and stores keys at /data/keys. Tar it out:
Restore:

ClickHouse backup

Option A - volume snapshot (simplest)

Downtime: however long the tar takes (a minute to tens of minutes depending on size).

Option B - ClickHouse native BACKUP (no downtime)

Requires configuring a backup disk in ClickHouse config; see ClickHouse docs. Restore:

Restore order

If you’re restoring from backup after a catastrophic failure:
  1. Stop the whole stack: docker compose down.
  2. Restore apidata (JWT keys) first.
  3. Restore pgdata (Postgres).
  4. Restore chdata (ClickHouse).
  5. Bring up the stack: docker compose up -d.
  6. Smoke test: observal auth login, observal auth status.
Skipping step 2 works but every user has to re-login.

Verifying a backup

Test restores in a staging environment at least quarterly. Untested backups are guesses. Smoke test after restore:

Automated backup

A minimal cron setup (on the Docker host):
Ship the /backups directory offsite (S3, B2, rsync to another host).

Next

→ Troubleshooting