Files
cozystack/internal/backupcontroller
Alexey Artamonov e66b764734 fix(backups): let an unfinished MariaDB run block a legacy dump delete
A Backup taken before dumps were recorded finds its dump by window, and
only finished neighbour runs were allowed to contest a candidate. A run
uploads its dump and prunes older ones through maxRetention before its
operator Backup turns Complete, so in that gap the pruned run's cleanup
saw the newer run's dump as the only candidate and deleted it, leaving
that Backup Ready with nothing to restore.

The size probe and the restore keep ignoring unfinished runs, where a
wrong guess costs a size or a refused restore. Deletion now treats a run
that has not completed as one whose window is still open, so the dump is
left behind with a Warning, as for any other unproven attribution.
Holding the Backup would not help: once that run completes its window
still covers the candidate, and the attribution stays ambiguous.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
2026-11-08 20:21:22 +03:00
..