Backups
Drillmark stores everything in Postgres: parsed records, raw report blobs, tenants, data sources, alert state. Back up the database and the environment configuration together.
What to back up
- The Postgres database named in
DATABASE_URL(the sample stack uses thedmarc_reporterdatabase owned bydmarc_reporter). - The
.envfile andcompose.ymlon the host. - The IP2Location LITE binary file if
IP2LOCATION_DB_PATHis set. The file is reproducible from the public download, so re-downloading is also an option.
What NOT to back up
- The
apicontainer image. Rebuildable from source. - The Caddy configuration if stock. Rebuildable from
oci-build/Caddyfile.
ENCRYPTION_KEY
Back up ENCRYPTION_KEY the same way you back up the database, and keep the two paired. The key decrypts data_sources.encrypted_password and data_sources.oauth_refresh_token_enc; a database restored under a different key cannot recover source credentials, and there is no online rotation path. Operators must disable every source, change the key, and re-enter credentials on each source.
Postgres backup
Any standard Postgres backup method works. From the host running the stack:
docker compose exec --no-TTY db pg_dump --username=dmarc_reporter --format=custom dmarc_reporter > drillmark-$(date --utc +%Y%m%dT%H%M%SZ).dump
Restore into a fresh database with pg_restore --clean --if-exists --username=dmarc_reporter --dbname=dmarc_reporter drillmark-*.dump.
For continuous backups, use base backups plus WAL archiving (or a managed Postgres), same as for any Postgres workload. Drillmark adds no special requirements here.
Blob size
Raw report blobs dominate database size. See retention for how to bound the growth.