Backup and restore
What to back up
- Postgres — state: users, orgs, dashboards, rules, audit log.
pg_dumpdaily + WAL streaming for PITR. - ${CA_DIR}/secrets.key — the master key for AES-256-GCM SecretBox. Losing it = losing all sealed secrets (OAuth tokens, channel signing secrets).
- ${CA_DIR}/ca.crt + ca.key — the CA for agents. Losing it = re-enrolling all agents.
- TSDB data —
storageDataPath. A snapshot via the TSDB API + a backup utility.
Restore
- Postgres restore from a dump (or PITR)
- Restore CA_DIR with secrets.key + ca.{crt,key}
- TSDB restore from a snapshot
- Start the API — it picks up the existing state
Test the restore at least once a quarter. A backup you've never restored is theoretical.