Backup and restore
What to back up so a lost database or cluster is recoverable, and how to restore it.
Wardn keeps its data in Postgres (and, with a bucket object store, blob bytes in a bucket), so backing it up is backing up one database plus a few keys that live outside it. Wardn has no backup or restore command of its own: you use your database's tools, and this page says what to include and in which order to restore.
What to back up
| What | Where it is | Why it matters |
|---|---|---|
| The database | Your Postgres, or the bundled one | Everything Wardn knows: organizations, people, settings, snapshots, Activity, timelines, stored secrets and recordings. With the default object store, blobs are in Postgres too, so there are no files elsewhere. |
| The object store's bucket | Only with WARDN_OBJECTSTORE_PROVIDER=s3 or gcs | The bytes of snapshots and recordings. Restore it to the same point as the database, from bucket versioning; see Object storage. |
| The secret store's master key | WARDN_SECRET_MASTER_KEY: the Secret wardn-keys (or <release>-secrets), or the Compose keys volume | It unlocks the secrets Wardn stores, such as repository credentials, and Wardn's own certificate authority for the gateway. A database restored without it cannot open them. |
| The Better Auth secret | BETTER_AUTH_SECRET, in the same place | Sessions are signed with it. A new value means everyone signs in again. |
| The GitHub App key and webhook secret | Your Secret, or the files you mounted | You can make a new key in GitHub, but keeping it saves the step. |
| Your values file | Wherever you keep it | Reinstalls the same shape. |
Keep the keys apart from the database backups, with tighter access: someone who has both can read every stored secret.
Without the master key, the secrets in a restored database are lost for good. There is no way to recover them, and every source that used one needs its credential entered again.
What is not in a backup
- The clusters' own state. Your workloads run in your clusters and are not touched by a control plane restore. Operators keep running what they applied while the control plane is away (Failures and offline clusters).
- The operator's identity. Each operator keeps its client certificate in a Secret in its own cluster. After a restore it reconnects with it, as long as the cluster exists in the restored database and was not disconnected there.
- Live updates. The web app's live stream is not stored, by design.
Take a backup
Use your database's own backups. A managed service's automated snapshots with point-in-time recovery are the best choice. Otherwise, take a logical dump on a schedule:
pg_dump --format=custom --file=wardn-$(date +%F).dump \
"postgres://[email protected]:5432/wardn?sslmode=require"Then copy the keys once, and again whenever you change them:
kubectl -n wardn get secret wardn-keys -o yaml > wardn-keys.yamlA dump taken while Wardn runs is consistent: pg_dump reads one snapshot of the database.
Restore
Restore into an empty database, with the same keys, before any server starts against it.
Stop the control plane
kubectl -n wardn scale deploy/wardn-wardn-standard-server --replicas=0
kubectl -n wardn scale deploy/wardn-wardn-standard-web --replicas=0With Compose, docker compose stop server web.
Put the keys back
Recreate the keys Secret from your copy, before the chart's hook Job can make new ones:
kubectl -n wardn apply -f wardn-keys.yamlWith Compose, unpack wardn-keys.tgz into the keys volume the same way you packed it.
Restore the database
pg_restore --clean --if-exists --no-owner --dbname \
"postgres://[email protected]:5432/wardn?sslmode=require" wardn-2026-11-10.dumpFor wardn-tiny, run it in the bundled pod:
kubectl -n wardn exec -i wardn-wardn-tiny-postgres-0 -- \
pg_restore -U wardn -d wardn --clean --if-exists --no-owner < wardn-2026-11-10.dumpWith point-in-time recovery, restore to a new database instance and point postgres.external.host at it.
Start the control plane
Scale the Deployments back, or helm upgrade with your values. The server runs any migrations the dump is missing, and /api/v1/ready answers once it is done.
Check what changed since the backup
Operators reconnect by themselves. Then look for what the backup did not have:
- Clusters registered after the backup are not in it, so their operators cannot join. Register them again and connect them with a new join token (
wardn cluster connect). - Snapshots, settings and Activity recorded after the backup are gone. Check the deployments that changed in that time on their deployment pages, and compare what the cluster runs with Compare snapshots and Drift.
Test your restores
A backup you have never restored is a guess. Restore into a scratch database now and then, start a wardn-tiny or Compose install against it with the same keys, and check that you can sign in and that a source with stored credentials still renders.