Stop kopia snapshotting comment lines as paths - #76
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Last night's backup reported five failing sources and the alert quoted the
SOURCESlist's own comment text — so it read as though SuperProductivity's only durable copy had failed to back up.
It hadn't.
copyparty/sp-syncandfizzy/storagesnapshotted normally inthe 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:The
SOURCESlist is deliberately commented inline — the notes explainingwhy 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#*. Coverslocal-sources.txttoo, which may equally be commented.
Scope — checked, not assumed
9th. One night of noise, no missed backups.
source, so nothing was registered.
kopia snapshot listshows 47 sources,none beginning
/#. The alert's warning that the verifier would flag themas stale was moot.
verify-backups.shnever shared the bug — it derives active sourcesfrom kopia's own policies, not from this list.
Verification
A real run after the fix: 0 FAILED lines, empty
.backup-failures, andboth critical sources snapshotted.
Noted but deliberately left alone: successful runs emit
Terminated: 15tostderr as each per-source timeout killer is reaped. Pre-existing, harmless,
unrelated.