Self-hostOperate
Backups
Holtkeeper keeps everything that matters in its database: forges, credentials, settings, analysis history, the audit log. Artifacts can be regenerated, caches are disposable, and the vault key is the one thing nobody can recreate. Back up the database and the key; the rest is optional.
| What | Back up | Why |
|---|---|---|
Postgres schema holtkeeper or the SQLite file |
yes | Everything except artifacts. Credentials in it are sealed with the vault key. |
| Vault key and the other secrets | yes, separately | Without the vault key the sealed credentials in a backup cannot be read. |
Artifact bucket or /data/artifacts |
optional | Content-addressed; rerunning analyses regenerates them. |
/workspace, /mise, the egress cache |
never | Caches; rebuilt on demand. |
Postgres
Section titled “Postgres”A logical dump is a consistent snapshot of a running database:
pg_dump --schema=holtkeeper --format=custom "$HOLTKEEPER_DATABASE_URL" > holtkeeper.dumppg_restore --dbname "$HOLTKEEPER_DATABASE_URL" holtkeeper.dumpFor point-in-time recovery, use your platform’s base backups and WAL archiving: a managed database’s backups, your operator’s (CloudNativePG and others), pgBackRest or barman.
Under Compose, run the dump in the postgres service:
docker compose exec -T postgres pg_dump -U holtkeeper --schema=holtkeeper --format=custom holtkeeper > holtkeeper.dumpSQLite
Section titled “SQLite”A plain copy of a live file can be torn. Use a consistent snapshot:
sqlite3 /data/holtkeeper.db ".backup /data/backup.db"VACUUM INTO 'backup.db' works too. If you copy files by hand, stop the container first, or copy holtkeeper.db, holtkeeper.db-wal and holtkeeper.db-shm together. To restore, put the backup at the configured path while the process is stopped.
Artifacts
Section titled “Artifacts”Artifacts are reports, encoded image variants and cached results. They are content-addressed and regenerated by rerunning analyses, so backing them up is optional. If you want them, turn on versioning or replication on the bucket.
Retention
Section titled “Retention”server.retention keeps the artifact store from growing without bound. The sweep runs hourly on the process holding the scheduler lease: first everything older than days, then, while the store is above maxBytes, the least recently used.
retention: { days: 90, maxBytes: 200_000_000_000 },The starting configs keep 90 days. Settings › System › Storage and caches shows the retention in force, the bucket’s usage against the quota you declared, and the change over the last seven days. From there admins can also clear storage areas by hand.
The leader also sweeps the audit log by its own retention and checks the audit chain daily.
Restore checklist
Section titled “Restore checklist”- Start from the same image version as the backup, or a newer one: migrations run forward only.
- Restore the database while no Holtkeeper process is running.
- Give every process the same
HOLTKEEPER_VAULT_KEYas before. - Start web, check
/readyz, then start workers. - If artifacts were not restored, rerun the analyses whose files you need.
Related
Section titled “Related”- Upgrades — back up before you upgrade.
- Configuration —
server.retentionand artifacts. - store-postgres module and store-sqlite module