my_backup-ecco-main-recovery
Section titled “my_backup-ecco-main-recovery”Date: 2026-08-13 Dept: IT · Project: my_backup
What happened
Section titled “What happened”Talbot needed to recover an Ecco Pro backup rotation file (D:\FSS\Misc\Ecco\Main.bk1/Main.eco) and found zero Ecco files anywhere in the Kopia Active repo, at any snapshot age.
Root cause
Section titled “Root cause”fss.kopiaignore (my_backup/config/fss.kopiaignore, restored to D:\FSS\.kopiaignore each pipeline run) had:
Misc/Ecco/*.ecoMisc/Ecco/ excludes the whole folder, not just .eco — despite the adjacent comment saying “Ecco Pro files are often locked. Back up *.bk* files instead.” The .bk1-.bk5 rotation files this was meant to protect were blocked too, permanently.
Lifeboat: the monthly 7-Zip archives (seven_zip_backups in config.yaml) build from global_excludes only, not .kopiaignore — so Misc/Ecco/*.bk1 was recoverable from D:\bak\FSS_BkUp\FSS_2026-*.7z. Recovered 2 versions of Main.bk1 (2026-08-12 and 2026-06-26 — 7-Zip is monthly-only, no weekly granularity existed) into C:\tmp\Ecco_Recovery\; Talbot confirmed one opened correctly in Ecco Pro, then deleted the recovery folder.
fss.kopiaignore:Misc/Ecco/→*.ecoonly..bk*files no longer blocked from Kopia.config.yamlglobal_excludes: per Talbot’s explicit call, keep*.bk2/*.bk4excluded, drop*.bk3/*.bk5from the exclude list (alongside*.bk1, which was never excluded) —.ecostays excluded everywhere (locked-file rationale still applies).- Second bug found while wiring #2 up:
tasks.py’ssnapshots()only pushed the merged excludes policy to Kopia when a snapshot had its ownexcludes:list (len(excludes) > 0). “FSS (Active)” has none, soglobal_excludesedits were silently never reaching Kopia’s live policy for it —config.yamlsaid one thing, the repo enforced another, indefinitely. Fixed the gate to fire on snapshot excludes OR global excludes. - Applied the corrected policy directly to the live
D:\FSSKopia source viakopia policy set --clear-ignore+ re-add, so the fix was effective immediately rather than waiting on the next scheduled run. - Committed:
my_backup0b1f4fc.
Live verification (not just committed — actually confirmed)
Section titled “Live verification (not just committed — actually confirmed)”Windows Task Scheduler could not be triggered from WSL (schtasks /Run, Start-ScheduledTask both failed “system cannot find the file specified” — a WSL→Windows interop/session limitation, not a real missing file; documented in GlobalDevRules.md §3.9). Switched axis: ran the task’s real batch script directly (D:\FSS\Software\Utils\Windows\my_backup-daily-task.bat via cmd.exe), exercising the identical production pipeline.
Run completed exit 0, no errors/warnings. Confirmed via kopia ls on the resulting snapshot (k822db5eab..., 2026-08-13 09:31:35): Misc/Ecco now contains Main.bk1/.bk3/.bk5 (and bk1/bk3/bk5 for every other Ecco file), with .bk2/.bk4/.eco correctly still absent.
Process lesson (promoted to ~/ai-config/AGENTS.md)
Section titled “Process lesson (promoted to ~/ai-config/AGENTS.md)”When a real test can only run after a scheduled/cron job, default to triggering it now (or scheduling a follow-up and iterating to a confirmed outcome) rather than closing the task on “should work next run.” Talbot’s explicit correction: the agent’s job includes executing, testing, and reporting back to a confirmed outcome — not stopping at “committed, not yet verified.”
Full detail
Section titled “Full detail”Complete investigation + command transcript: my_backup LESSONS.md (2 new entries: whole-folder .kopiaignore rules, global_excludes policy-push gate gap).