feat(backup): per-job schedules, stale-lock recovery, service manifests

- Add per-job `schedule` (systemd OnCalendar) overrides and document the
  global `backup_schedule` / `backup_randomized_delay` knobs.
- Run `restic unlock` before backup/forget/check so a run killed mid-flight
  no longer wedges every later run on a stale exclusive lock.
- Publish backup manifests for fdroid, immich and unifi, so the inventory
  decides only where (repositories, retention, schedule).
- Document that `read_data_subset` re-reads on every job targeting the
  repository, so a large repository wants a small fraction.
This commit is contained in:
Clément Désiles
2026-09-10 16:47:33 +02:00
parent f6c4d36bbe
commit 0ec6224941
7 changed files with 44 additions and 3 deletions
+9
View File
@@ -327,6 +327,15 @@ repo_work() {
restic init || return 1
fi
# A run killed mid-flight (systemd timeout, OOM, reboot) leaves an exclusive
# lock behind. `forget --prune` and `check` both need that lock, so every
# later run backs up successfully and then fails, until someone clears it by
# hand. The per-repository flock above makes us the only local writer, and a
# repository is never shared between hosts (see README), so any lock left
# here belongs to a dead process. `unlock` only removes locks it considers
# stale, so a genuinely live one is left alone.
restic unlock || return 1
repo_backup || return 1
repo_forget || return 1
repo_check || return 1