Back up every store: the restic module holds node-backup, the stores contribute their dumps

ADR 0214 / to-be 43. restic keeps one repository per machine and takes a nightly snapshot per
module — 14 daily, 8 weekly, 6 monthly — and restores beside the live data, never over it. postgres,
mssql and mongodb contribute a consistent dump; minio, influxdb, the vault, mailu, gitea and
nextcloud the directories that hold their data.
This commit is contained in:
2026-10-05 11:47:59 +02:00
parent 4224ac7252
commit 32cd92baeb
15 changed files with 724 additions and 6 deletions
+15 -1
View File
@@ -74,6 +74,13 @@
"mode": "0700",
"owner": "999:70"
},
{
"id": "dumps",
"type": "directory",
"path": "${dir:store-data}/dumps",
"mode": "0700",
"owner": "999:70"
},
{
"id": "server",
"type": "container",
@@ -121,5 +128,12 @@
}
}
]
}
},
"contributions": [
{
"seat": "node-backup",
"kind": "backup",
"content": "run docker exec -u postgres postgres sh -c 'cd /var/lib/postgresql/data/dumps && for db in $(psql -Atc \"select datname from pg_database where oid >= 16384 order by 1\"); do pg_dump -Fc -f \"$db.dump.partial\" \"$db\" && mv \"$db.dump.partial\" \"$db.dump\" || exit 1; done'\npath ${dir:dumps}\n"
}
]
}