fix(actual-budget): page when the finance backup loses its off-box copy #203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/finance-backup-offbox-pages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #202, implementing the two decisions taken on it.
Page when the off-box copy fails
Every other backup job treats the NAS copy as best-effort and exits 0 without it. For the finance data that policy has no safety net: the local copy is a hostPath on the single node holding the RWO PVC, and there is no offsite tier, so a quietly failing off-box copy leaves the whole budget history one dead Pi away from gone.
actual-budget-backupnow exits non-zero when the off-box copy fails, soKubeJobFailedpages. The local archive is already written by that point and is kept - verified on disk after a failing run, since the error message claims it.This is a deliberate divergence from the other five jobs rather than drift, so it is commented at the call site and recorded in the runbook as a per-job failure-policy table.
backoffLimit: 2
Consequence of the above. Each attempt writes a fresh timestamped archive and re-runs the keep-30 prune, so the default backoffLimit of 6 would let a single night of NAS downtime push 7 same-day archives through the local set and squeeze out the older days the retention exists to protect. 3 attempts rides out a brief blip and still leaves 10 days of local depth.
Verification
Same stubbed-smbclient harness as #202, against real budget data:
cdfails, file lands in share rootOffsite
Decided: LAN-only accepted for now, revisit later. Recorded in the runbook as an explicit dated decision with the exposure spelled out (a whole-house loss takes the finance history, the Vaultwarden export and the HA config together), so it reads as deferred rather than overlooked.