vps-health-api/agent/pg-backup-pull
le king fu 429ddda15a
All checks were successful
CI / verification (pull_request) Successful in 37s
fix(pg-backup-pull): cap the backups at 30 days from today, even on a failed pull
The privacy policy promises backup copies kept 30 days at most. The rotation
was anchored on the newest local backup and skipped on a failed pull, so when
pulls stopped, copies older than 30 days stayed for good.

The rotation now runs on every pass, anchored on today (UTC): it keeps today
and the 29 days before it and removes every older dated directory, the last
copy included (Max, 2026-10-24). The latest-anchored pass is gone: since
latest is never after today, it never removed anything the cap does not.
latest and files are counted after the rotation. A failed pull is still
reported pull_failed with exit 2, a rotation failure then only logged.
A dated symbolic link is neither removed (rm -rf link/ would empty its
target) nor counted.

Refs #71

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 21:15:58 -04:00
..
maximus-pg-backup-pull.service feat(agent): daily pull of the encrypted PostgreSQL backups 2026-10-10 16:18:17 -04:00
maximus-pg-backup-pull.timer feat(agent): daily pull of the encrypted PostgreSQL backups 2026-10-10 16:18:17 -04:00
run-pg-backup-pull.sh fix(pg-backup-pull): cap the backups at 30 days from today, even on a failed pull 2026-10-26 21:15:58 -04:00