Skip to content

Monthly backup generations not kept #10299

Closed

Description

@dezren39

Found by the 2026-11-14 whole-PM-stack backup/DR audit (verdict issue filed same day).

The ruling (Drew, 2026-11-03 on #1258, Q3/Q6): off-machine retention = daily generations kept 30 days, plus monthly generations kept 12 months; #1218 Project exports retained off-machine for 1 year.

Observed (2026-11-14): no routine implements the monthly tier.

  • pm-dashboard-backup / pm-stack-backup / dashboard-backup prune their dated dirs at 30 days (local, and the same 30-day retention on the R2 + Drive legs) — grep for monthly|keep-monthly|12 month across nixos/home/*.sh and ~/tools/*backup*.sh returns nothing.
  • restic jobs (repo-archive-backup, laptop-state-backup) use keep-last 7 / keep-daily 7 / keep-weekly 4 — no monthly-12 either.
  • Supabase dumps in R2 carry a config note: "Retention is informational for now: pruning is a deliberate manual step" (90 days noted, nothing enforced).
  • pm-stack: make Project #4 auditable — scheduled export of fields, views, item counts, status/area distribution #1218 is CLOSED (Project export built), but no off-machine copy of a Project export with a 1-year retention was found in this audit.

Consequence: in ~30 days the fleet loses the ability to restore any PM state older than a month, contrary to the recorded ruling — silently, because every individual routine is behaving as coded.

Fix shape: add a monthly-generation pin (e.g. first-of-month archive copied to a monthly/ prefix on R2 + Drive with 12-month prune) to the pm-dashboard/supabase routines, and confirm the Project export's off-machine home + retention.

Acceptance: R2 + Drive listings show a monthly generation for the current month under the monthly prefix, and the prune logic for it is in the flake scripts with a test or a recorded dry run.

Activity

  1. developing-today commented on Nov 14, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — task 19223 (lane code-b)

  3. added
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    on Nov 17, 2026
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Agent note — task 20556 (lane any-k): #10299 monthly tier implemented in PR #11012; November generation seeded live on R2 + Drive

    • Implementation (PR pm-dashboard-backup: monthly generations kept 12 months (#10299) #11012): pm-dashboard-backup.sh gains pin_monthly + prune_monthly on both offsite legs — first-of-month archive pinned under monthly// (sha256-verified, first generation kept), monthly generations older than 12 months pruned (never the run's own month; failed listing fails the run). Daily 30-day tier unchanged.
    • Tests: new pm-dashboard-backup-monthly.test.sh all passed (pin / keep-first / prune-expired / keep-recent on both legs, pinned copy byte-identical); pm-dashboard-backup-prune.test.sh and pm-dashboard-backup.test.sh regression suites all passed; bash -n clean.
    • Live seeding (2026-11-17, before the next amd switch deploys the script change): the 2026-11-16 daily archive (24M, sha256 528d47479ce3dfabc1cc8b44f88529c1ee9715152169f18dd861e1d4b5490c9a — the last complete run's recorded sha) was copied to monthly/2026-11/dashboard-2026-11-16.tar.zst on BOTH legs and verified by full download sha256:
      • R2: r2bak:supabase-backups/dashboard/monthly/2026-11/ -> dashboard-2026-11-16.tar.zst, sha256 match.
      • Drive: drive:Cloud/cold-store/db-backups/pm-aggregator/monthly/2026-11/ -> dashboard-2026-11-16.tar.zst, sha256 match.
    • Project export (pm-stack: make Project #4 auditable — scheduled export of fields, views, item counts, status/area distribution #1218): the Project Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 9530656 #4 scheduled export rides inside this archive's aggregator/fleet-feed state, so its off-machine home is R2 + Drive under the dashboard prefix, and the monthly tier gives it the ruled 1-year retention. Confirmed and recorded here per the packet acceptance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/mMedium: expected under 1 day of workpriority/highImportant and time-sensitivestatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions