snapshot restore --skip-errors aborts on a missing or damaged blob instead of skipping the files that need it #218

Closed
opened 2026-10-06 01:49:42 +02:00 by clawbot · 1 comment
Collaborator

internal/vaultik/restore.go:356-361 returns any error from downloadNextBlobSet (:414-446) straight out of the restore loop. Only errors from restoreFile go through the skip path (:523-544). Measured on next at 0700901 with four blobs, one of them deleted, and SkipErrors: true: the restore fails with downloading blob ...: object not found. Which other files were restored before the abort depends on processing order.

The README (:180) says --skip-errors skips files "that cannot be restored when restoring, instead of aborting". The sentence's caveat that packing and storage errors still abort is scoped by its parenthesis to backup, where such an error would leave a chunk recorded but not stored. A file whose blob is unreadable is a file that cannot be restored.

Definition of done

  1. With --skip-errors, every file that depends on an unreadable blob is reported as failed, every other file is restored, and the command exits non-zero.
  2. Without --skip-errors, a missing blob still aborts the restore as it does today.
  3. A test deletes one blob from a multi-blob snapshot, restores with skip-errors, and asserts that the unaffected files are restored and that the error is returned.
  4. make check passes.

Model: fable-5-1 (audit); opus-5-5 (issue)

`internal/vaultik/restore.go:356-361` returns any error from `downloadNextBlobSet` (`:414-446`) straight out of the restore loop. Only errors from `restoreFile` go through the skip path (`:523-544`). Measured on `next` at `0700901` with four blobs, one of them deleted, and `SkipErrors: true`: the restore fails with `downloading blob ...: object not found`. Which other files were restored before the abort depends on processing order. The README (`:180`) says `--skip-errors` skips files "that cannot be restored when restoring, instead of aborting". The sentence's caveat that packing and storage errors still abort is scoped by its parenthesis to backup, where such an error would leave a chunk recorded but not stored. A file whose blob is unreadable is a file that cannot be restored. ## Definition of done 1. With `--skip-errors`, every file that depends on an unreadable blob is reported as failed, every other file is restored, and the command exits non-zero. 2. Without `--skip-errors`, a missing blob still aborts the restore as it does today. 3. A test deletes one blob from a multi-blob snapshot, restores with skip-errors, and asserts that the unaffected files are restored and that the error is returned. 4. `make check` passes. Model: fable-5-1 (audit); opus-5-5 (issue)
clawbot self-assigned this 2026-10-06 01:49:42 +02:00
Author
Collaborator

Fixed in #243. With --skip-errors, a blob that cannot be downloaded now fails every file that needs it, and the restore goes on with the remaining files and still exits non-zero. Without the flag the restore still aborts; the error now also names one affected file.

Model: opus-5-5

Fixed in https://git.eeqj.de/sneak/vaultik/pulls/243. With `--skip-errors`, a blob that cannot be downloaded now fails every file that needs it, and the restore goes on with the remaining files and still exits non-zero. Without the flag the restore still aborts; the error now also names one affected file. Model: opus-5-5
Sign in to join this conversation.