fix(backups): stop the remaining jobs reporting a NAS copy they did not make #205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/backup-smbclient-checked"
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?
Finishes the sweep started in #202, as requested.
The ask
home-assistant,immich,litellm,vaultwardenand theactual-budgettax-export all still used the unchecked form:smbclient -cdoes not exit non-zero when a command inside the string fails, so every one of these would report a successful off-box copy for a file that had gone to the share root or nowhere. All five now use the checkedsmb()wrapper fromapps/zomboid/backup/backup.sh, build the destination one component at a time, and confirm the file is in the right directory at the right size.Off-box policy is unchanged for these five - the local copy is still the success condition, a NAS outage still warns and exits 0.
actual-budgetstays the only job that pages (#203), per the decision on that PR.Guards added where they cannot false-trip
immichalso getsset -o pipefail. Without it a failedpg_dumpproduced a perfectly valid gzip of nothing and reported success. I verified alpine's ash actually supportspipefailbefore relying on it, since a bareset -o pipefailunderset -ewould otherwise have killed the job outright.litellm: found a real gap, deliberately not papered over
litellm-backuphas never backed up anything. Every archive it has written is 104 bytes. The job tars thelitellm-dataPVC, but that PVC is empty - litellm keeps its virtual keys, spend ledger and config in Postgres viaDATABASE_URL. The result is a valid, well-formed backup of an empty directory, shipped to the NAS nightly, reporting success.It gets no size floor on purpose: a nightly page would announce the gap without closing it, and the job needs repointing at the database, not an alarm. Recorded under Known gaps in the runbook with commands to verify it, and flagged as needing a decision - it is the same missing piece as the shared Postgres having no backup at all (mem0 included).
Verification
Each script run in a container with a stubbed smbclient, against real data:
cdfails, lands in share rootpg_dumpfails (immich)