fix(db-backup): age pre-migration dumps out with the nightly ones

Pre-migration dumps were kept by count alone, so an install that updates
rarely kept its last two, and every account deleted since, indefinitely,
while the docs and the backups card stated the nightly retention as the
retention of deleted accounts. A pre-migration dump older than the oldest
nightly dump kept now goes, except the newest one, the way back from the
latest update, which stays until the next update. The card, the disaster
recovery guide and its variable table say so.
This commit is contained in:
Marc-André Bombeck committed 2026-10-25 17:21:52 +01:00
1 parent 26a9efdf52
commit 6f83e7e685
14 files changed
+100 -27

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@
* this image brings migrations the database has not applied, it first writes
* `healthlog-<timestamp>-pre-migration.dump` with its manifest into
* `DB_BACKUP_DIR` (`src/lib/database-backup/dump-core.mjs`), and keeps the
* newest two.
* newest two, neither older than the oldest nightly dump except the newest.
*
* Exit 0: the dump was written, or there was nothing to do (no pending
* migration, a new database, `DB_BACKUP_BEFORE_MIGRATE=false`), or there is no