vps-health-api/agent/pg-backup-pull
le king fu b87b3d7253
All checks were successful
CI / verification (pull_request) Successful in 31s
fix(agent): run the backup pull under busybox, catch an empty filter
The CI runs the tests in node:22-alpine, where 9 of the 12 cases failed:
no ssh on PATH, and busybox has neither `find -printf` nor
`date -d "... days"`. The newest dated directory is now found by a loop
over the glob, and the rotation cutoff by epoch arithmetic, which GNU
date and busybox both read. The tests add a fake ssh, and a fake flock
where the host has none.

The rotation_failed case failed the pass through a read-only directory,
which root ignores: it now uses a fake rm.

Review suggestions: the rsync argv must put --include=*/ before
--exclude=* (without it nothing crosses and the pass still says ok), and
a case runs the real rsync through the fake ssh when rsync is present.
A pass whose newest directory is not today's logs a warning.

Refs maximus/la-compagnie-maximus#220

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:56:05 -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(agent): run the backup pull under busybox, catch an empty filter 2026-10-10 18:56:05 -04:00