1 What to back up
| What | Where it is | Why it matters | How |
|---|---|---|---|
| The database | The pgdata18 volume, or your managed PostgreSQL | Every record, the audit log and its hash chain, users and password hashes, roles, settings, integrations and their encrypted secrets, and the job queue (the pgboss schema) | pg_dump, physical backups or point-in-time recovery |
| Attached files | The uploads volume, or one Azure Blob container or S3 bucket | Evidence, policy documents, contract versions, executed copies and certificates. The database names them and does not hold them | A file archive, or versioning and soft delete on the store |
.env | The installation directory, or your platform's secret store | Holds the secrets below, and every setting the host sets | A password vault, updated whenever it changes, and stored apart from the backups |
| Compose additions | docker-compose.override.yml, your own Caddyfile.*, .deploy-keep, any certificates you added | Whatever you changed from the release | With .env, or in your own configuration repository |
| The release | The release archive or commit, recorded in .deployed-commit by deploy/update.sh | A restore needs this release or a later one, as an earlier release cannot read a newer schema | Keep the archive, or know the commit |
| The age private key | Your vault, never the server | Without it, encrypted backups cannot be read | A password vault |
caddy-data (optional) | Docker volume, with the tls profile | Issued certificates and the ACME account, or tls internal's private root. Caddy issues new ones, so this only matters for a private root that browsers were told to trust, or to avoid hitting Let's Encrypt's rate limits while rebuilding | Any volume backup |
1.1 The secrets
| Secret | Without it |
|---|---|
SETTINGS_ENCRYPTION_KEY, or AUTH_SECRET when that is unset | Everything encrypted with it stays encrypted for good: the SMTP password or Microsoft 365 client secret, LDAP bind password, SAML private key, other integration secrets kept in settings, such as DocuSign and Entra, and the address and signing secret of every notification webhook. Every two-step verification enrollment stops working too. See "A lost secret" |
AUTH_SECRET | Everyone signs in again, and SAML sign-ins in progress must start over. If SETTINGS_ENCRYPTION_KEY is unset, also the row above |
POSTGRES_PASSWORD | Set a new one. See "A lost secret" |
APP_DB_PASSWORD | Choose a new one: migrate sets it on every start |
Integrations live in the database. Entra, SAML, LDAP, DocuSign, email, branding, templates, notification rules and every other setting made in the application come back with it, so they need no backup of their own. Their secrets come back readable only with the key above. Things held outside the application still need their own care: the SAML certificate your identity provider trusts is in the database, and an expiring Entra or DocuSign credential is renewed where it was issued.
The application role and the owner role are PostgreSQL roles, which pg_dump leaves out. You do
not need pg_dumpall: under Compose, the image creates the owner from POSTGRES_USER, and
migrate creates the application role and reapplies its grants. On a managed server, the
owner role is the one you made when you set the server up, and the cloud guides have the steps.
1.2 What needs no backup
- The image. Rebuild it from the release, or pull it from your registry.
/tmp,.next/cacheand the containers. Nothing lasting is kept there.- Text read from contract files. It is in the database, and the worker rebuilds any that is missing.
- Container logs. Nothing restores them. Send them to your log platform if you must keep them.