fix(manage): backup restore fails fast on a missing or wrong snapshot #226
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/restore-validate-snapshot-first"
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?
A restore without --snapshot used 'latest', which is often the Vaultwarden-only snapshot; the remote host only discovered it restored nothing after loading the repository (over a minute). restore_pick_snapshot checks locally, before any remote step: the snapshot exists, covers the service paths (all three for --service all), and prints the pinned id; otherwise it fails at once and names the newest snapshot that covers them. Dry runs use it too. No local restic: 'latest' is refused.
Checked: test-restore-snapshot.sh (10 cases, in lint.yml); dry runs against the real repository: an unknown id fails immediately naming f3e5d939; without --snapshot it currently resolves to f3e5d939 because that is the newest snapshot; the failing 'latest' path is covered by the unit tests only, since 'latest' cannot be made a vaultwarden snapshot on demand.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ