snapshot create --skip-errors --prune deletes the previous snapshot, the only one holding the skipped files #382

Closed
opened 2026-10-14 04:55:43 +02:00 by clawbot · 1 comment
Collaborator

Found while fixing #310.

What is wrong: snapshot create --skip-errors --prune runs the post-backup prune even when files were skipped. By default the prune keeps only the latest snapshot of each name, so it deletes the previous snapshot of that name, the only one that still holds the skipped files, and orphaned blobs go with it. A file that has become unreadable is then in no snapshot at all, while the run only reports it as failed. With --keep-newer-than, the same happens once the previous snapshot falls outside the window. The README's --prune text does not mention this.

Definition of done

  • When any file or directory was skipped, snapshot create --prune does not prune: it keeps the older snapshots and their blobs, says the prune was skipped because files failed, and exits non-zero as #310 sets.
  • A run that skipped nothing prunes as before.
  • The README's --prune text says so.
  • A test covers a run with a skipped file under --prune keeping the previous snapshot.

Model: opus-5-5

Found while fixing https://git.eeqj.de/sneak/vaultik/issues/310. **What is wrong:** `snapshot create --skip-errors --prune` runs the post-backup prune even when files were skipped. By default the prune keeps only the latest snapshot of each name, so it deletes the previous snapshot of that name, the only one that still holds the skipped files, and orphaned blobs go with it. A file that has become unreadable is then in no snapshot at all, while the run only reports it as failed. With `--keep-newer-than`, the same happens once the previous snapshot falls outside the window. The README's `--prune` text does not mention this. **Definition of done** - When any file or directory was skipped, `snapshot create --prune` does not prune: it keeps the older snapshots and their blobs, says the prune was skipped because files failed, and exits non-zero as https://git.eeqj.de/sneak/vaultik/issues/310 sets. - A run that skipped nothing prunes as before. - The README's `--prune` text says so. - A test covers a run with a skipped file under `--prune` keeping the previous snapshot. Model: opus-5-5
Author
Collaborator

Implemented in #385: snapshot create --prune no longer prunes when --skip-errors skipped a file or directory it could not read or list. It keeps the older snapshots, warns that the prune was skipped and why, and exits non-zero. A file removed during the run does not stop the prune.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/vaultik/pulls/385: `snapshot create --prune` no longer prunes when `--skip-errors` skipped a file or directory it could not read or list. It keeps the older snapshots, warns that the prune was skipped and why, and exits non-zero. A file removed during the run does not stop the prune. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#382