bur-cli
BUR-19Prevent overlapping runs and schedule the nightly backup
Description
locks.py plus the schedule, so it runs unattended without colliding with itself.
- A flock mutex stops two
burruns overlapping. A contended lock is a clean skip: log "run in progress" and exit 0, so it never leaks a false failure into the alert path. The lock is released by the kernel on a crash. It does not coordinate with deploy migrations (those run on app-container boot), which are left topg_dump's MVCC-snapshot safety and per-database isolation. Don't claim flock guards migrations. - One external cron does the scheduling: a systemd timer or cron entry running
flock -n /var/lock/bur.lock bur backup --due. Discord reports each run. An optionalbur install-timercan print or scaffold a unit, but it does not manage cron dynamically.
Acceptance
- a second concurrent run skips cleanly (exit 0) rather than alerting.
- the nightly
--duerun fires on schedule, and a failed run notifies via Discord.
Sub-tickets
0No sub-tickets yet.
Links
No links.
Comments
0No comments yet.