Repository navigation
Description
pm-stack backups silently produced empty day-dirs for 3 days
~/backups/pm-stack/ has day directories for 2026-10-30, 2026-10-31, and 2026-11-01 that were created on schedule but contain no archive — the last good tarball before today was 2026-10-29. Nothing alarmed; the gap was found by hand during the 2026-11-01 Kaneo/PostgreSQL incident (#3849), where the Oct 29 kaneo.dump turned out to be the only logical fallback.
Cause: ~/tools/pm-stack-backup.sh creates the day dir up front, then set -e kills it mid-run, leaving the empty dir as camouflage. The mid-run deaths were stale container names from the compose→oci migrations: docker exec pm-stack-postgres-1 failed while the compose stack was down for the pm-apps activation (Oct 30), and after Grist/Pad became oci containers the script still targeted grist-grist-1 / pad-pad-1 (live names: pm-grist / pm-pad).
Already fixed on the laptop (2026-11-01): names updated in ~/tools/pm-stack-backup.sh (original kept as pm-stack-backup.sh.orig-2026-11-01), and a rerun produced a verified archive for 2026-11-01 (manifest-checked by the script itself, sha256 d7a8881df26333269d4cb9b732b3daafbb5a6fdf8a7ee18a084d1baae7551833).
What remains worth doing:
- The script (or its scheduling service, code#1516) should treat "day dir exists but no verified archive" as a failure worth surfacing — an empty dir currently reads as a completed backup day in any casual listing.
- Container names are migration-fragile; resolving targets by label/project (or failing with the container list in the log) would have made this a one-day, self-explaining failure instead of a silent 3-day gap.
Acceptance criteria
- A backup run that ends without a verified archive is surfaced as a failure (alarm, non-zero service result, or filed issue) — an empty day-dir no longer reads as a completed backup day.
- Backup targets are resolved robustly against container renames (by label/project, or the run fails loudly with the actual container list in the log), so a compose-to-oci migration cannot silently break targeting again.
- A drill or log excerpt demonstrates the failure path firing on a simulated missing-container run.
Activity
dezren39 commentedon Nov 2, 2026
Intake review
Related: issue #3849 (the incident during which this gap was found; its Oct 29
kaneo.dumpwas the only logical fallback), issue #1516 (the backup scheduling service named in the body).Notes: The immediate cause (stale container names in
~/tools/pm-stack-backup.sh) was already fixed on the laptop 2026-11-01 and a verified 2026-11-01 archive exists — what remains, and what this issue now tracks, is the silent-failure mode itself:set -edeath after the day-dir is created, and migration-fragile container names. Already carried priority/normal; this pass adds kind/source/effort/status/app and the acceptance section.Risks: backups that report success while empty are worse than no backups — any restore plan citing the Oct 30–Nov 1 window must treat those days as absent.
Suggested approach: make the script write the day-dir only after a verified archive exists (or rename it to a
.failedmarker on death), and resolve containers via compose/oci labels with a loud failure listing what was found.— fleet monitor intake enrichment, 2026-11-02.
developing-today commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
66 remaining items
developing-today commentedon Nov 8, 2026
🤖 Agent note · handed off
fix(backups): detect empty pm-stack day dirs (#3869)
developing-today commentedon Nov 9, 2026
🤖 Agent note · handed off
opencodefix(backups): detect empty pm-stack day dirs (#3869)
Merge pull request #7866 from developing-today/queue/13695-3869-pm-st…
dezren39 commentedon Nov 17, 2026
🤖 Agent note · triaged
dezren39 commentedon Nov 17, 2026
🤖 Agent note · done — root cause confirmed fixed; closing
~/tools/pm-stack-backup.shtargets the current names (pm-stack-postgres-1,pm-grist,pm-pad— not the stalegrist-grist-1/pad-pad-1), per the 2026-11-01 laptop fix recorded in this issue. Operational proof:~/backups/pm-stack/day-dirs run unbroken through 2026-11-16, each with itspm-stack-<date>.tar.zstarchive (the script manifest-verifies the tarball and exits 1 withVERIFY FAILEDon mismatch).nixos/home/laptop-backups-watchdog.test.sh) includes thepm-stack-empty-daycase: a simulated empty day-dir produces a named failure citing the date and the expected archive name.set -euo pipefail) and the watchdog alarms on the missing archive within its freshness window. If Drew wants label-based resolution itself, it is a small follow-up on the laptop script; the silent 3-day gap this issue reported cannot recur unnoticed.