Back up now always fails: restic exclude flags placed before the backup subcommand #73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
How it was found: clicking through the
98be903build in a headless BOS live VM on 2026-10-13. Backup & restore > A folder or drive > /home/liveuser/backup-target, password set, Back up now. The page said "The backup didn't finish", and Details showed:unknown command "node_modules" for "restic". Same result with an empty folder and with an already-initialised repo (0 snapshots written either way).Confidence: high. The error text matches the argv that src/src/commands/backup.rs
restic_backupbuilds (lines ~204-210):restic --repo R --exclude-caches --exclude node_modules --exclude target ... backup $HOME.--exclude/--exclude-cachesare flags of thebackupsubcommand, not global flags, so restic stops at them and treats "node_modules" as the subcommand.Bug: no home-folder backup can ever succeed, manual or scheduled. Because the error text never says "does not exist", Backup.svelte's first-run fallback (restic_init then retry) never runs either, so a new repo is never created. The scheduled path at line ~497 should be checked for the same ordering.
Fix: build
--repo R backup <excludes...> $HOME(excludes afterbackup). Add a unit test that asserts the argv order (index of "backup" is before the first "--exclude"), and ideally an integration test that runs restic init+backup against a temp dir when restic is on PATH.Confirmed: scheduled_backup() (backup.rs ~491-496) builds the same order (--repo, excludes, then backup), so daily/weekly scheduled backups fail too, silently (only a user journal line).
PR: #75 (head
5acab56)Review of BSET-72 at exact head
5acab56f82(base main14d1315872)Verdict: code accepted, merge BLOCKED pending CI. The required Forgejo check "check / check (push)" on
5acab56has been "Waiting to run" (queued behind a bread-ecosystem job on the shared self-hosted runner) since 20:41 and was still pending at 21:08 after bounded polling.Criteria:
--repo R backup <excludes...> $HOME: pass. restic_backup calls the new backup_args (src/src/commands/backup.rs:197-202, 215).Evidence (detached scratch worktree at
5acab56):unknown command "node_modules" for "restic".Next action: merge with a merge commit once "check / check (push)" is green on
5acab56and the head/base are re-confirmed.Verified on integrated main
a7b3e8b(merge3c91bfd, PR #75): restic_accepts_backup_args runs real restic init+backup+ls against a temp repo (note.txt kept, .cache excluded); backup_subcommand_precedes_its_flags; 179 cargo tests pass. Scheduled path shares backup_args.