Skip to content

Stop kopia snapshotting comment lines as paths - #76

Merged
mathewcsims merged 1 commit into
mainfrom
fix-kopia-comment-lines-parsed-as-paths
Aug 9, 2026
Merged

Stop kopia snapshotting comment lines as paths#76
mathewcsims merged 1 commit into
mainfrom
fix-kopia-comment-lines-parsed-as-paths

Conversation

@mathewcsims

Copy link
Copy Markdown
Owner

Last night's backup reported five failing sources and the alert quoted the
SOURCES list's own comment text — so it read as though Super
Productivity's only durable copy had failed to back up.

It hadn't. copyparty/sp-sync and fizzy/storage snapshotted normally in
the same run, seconds apart, with snapshot IDs.

Cause

The loop skipped blank lines but not comments, so kopia was handed
# Super Productivity's synced tasks… as a path:

FAILED: # Super Productivity's synced tasks. This is the ONLY durable copy — the app
  unable to get local filesystem entry: lstat /# Super Productivity's synced...

The SOURCES list is deliberately commented inline — the notes explaining
why those two paths matter sit with the paths — so the first run after
those comments landed failed five times.

Fix

Trim leading whitespace, then skip '' and #*. Covers local-sources.txt
too, which may equally be commented.

Scope — checked, not assumed

  • Runs happened every night 5th–9th and all finished cleanly until the
    9th. One night of noise, no missed backups.
  • No phantom sources entered the repository — they failed at prepare
    source
    , so nothing was registered. kopia snapshot list shows 47 sources,
    none beginning /#. The alert's warning that the verifier would flag them
    as stale was moot.
  • verify-backups.sh never shared the bug — it derives active sources
    from kopia's own policies, not from this list.

Verification

A real run after the fix: 0 FAILED lines, empty .backup-failures, and
both critical sources snapshotted.

Noted but deliberately left alone: successful runs emit Terminated: 15 to
stderr as each per-source timeout killer is reaped. Pre-existing, harmless,
unrelated.

Last night's backup reported five failing sources, and the alert quoted the
SOURCES list's own comment text -- which read as though Super Productivity's
only durable copy had failed. It had not: copyparty/sp-sync and
fizzy/storage snapshotted normally in the same run, seconds apart.

The loop skipped blank lines but not comments, so kopia was handed
'# Super Productivity's synced tasks...' as a path and tried to stat
/# Super Productivity's... The SOURCES list is deliberately commented inline,
so the first run after those comments landed failed five times.

Trims leading whitespace then skips blanks and comments, covering
local-sources.txt too.

Checked rather than assumed: backups ran every night 5th-9th and finished
cleanly until the 9th, so one night of noise and no missed data; no phantom
sources entered the repository (they failed at prepare-source, and kopia
lists 47 sources with none starting /#), so the verifier had nothing to flag;
and verify-backups.sh derives its sources from kopia's policies rather than
this list, so it never shared the bug.

Verified with a real run: zero FAILED lines, empty .backup-failures, both
critical sources snapshotted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mathewcsims
mathewcsims merged commit d3a470e into main Aug 9, 2026
7 checks passed
@mathewcsims
mathewcsims deleted the fix-kopia-comment-lines-parsed-as-paths branch August 9, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant