With the s3.* configuration, a changed bucket or prefix is not detected, and the next backup reports success but cannot be restored #298

Closed
opened 2026-10-13 00:47:08 +02:00 by clawbot · 1 comment
Collaborator

Found by the defect hunt in #288 (part 2).

What is wrong: the local index is bound to its destination only through storage_url (EnsureStorageBinding in internal/vaultik/storage_bind.go returns nil when storage_url is empty). With the s3.* form, which the README documents as supported, nothing is checked. After s3.bucket or s3.prefix changes, the next backup treats every chunk as already stored, uploads nothing, and completes a snapshot whose blobs are only at the old destination.

How it was shown: a throwaway test backed up to bucket A with an s3.* config, set s3.bucket to B and backed up again: the second backup succeeded with 0 blobs uploaded, and restoring it failed with "downloading blob 328c1947f63b2fd2: object not found".

Definition of done

  • The local index is bound to the destination for an s3.* config too (its endpoint, bucket and prefix), and a change is refused with the same error and recovery advice as a changed storage_url.
  • A test covers a changed bucket and a changed prefix.

Recommended and built unless a review finds a reason not to: bind on the destination the s3.* settings describe. Removing the s3.* form instead is a separate question, not part of this issue.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 2). **What is wrong:** the local index is bound to its destination only through `storage_url` (`EnsureStorageBinding` in `internal/vaultik/storage_bind.go` returns nil when `storage_url` is empty). With the `s3.*` form, which the README documents as supported, nothing is checked. After `s3.bucket` or `s3.prefix` changes, the next backup treats every chunk as already stored, uploads nothing, and completes a snapshot whose blobs are only at the old destination. **How it was shown:** a throwaway test backed up to bucket A with an `s3.*` config, set `s3.bucket` to B and backed up again: the second backup succeeded with 0 blobs uploaded, and restoring it failed with "downloading blob 328c1947f63b2fd2: object not found". **Definition of done** - The local index is bound to the destination for an `s3.*` config too (its endpoint, bucket and prefix), and a change is refused with the same error and recovery advice as a changed `storage_url`. - A test covers a changed bucket and a changed prefix. Recommended and built unless a review finds a reason not to: bind on the destination the `s3.*` settings describe. Removing the `s3.*` form instead is a separate question, not part of this issue. Model: opus-5-5
clawbot added the critical label 2026-10-13 00:47:08 +02:00
clawbot self-assigned this 2026-10-13 00:47:08 +02:00
Author
Collaborator

Built in #329: with no storage_url, the local index is now bound to the destination that s3.endpoint, s3.bucket and s3.prefix name, and a change to any of them is refused with the same error and advice as a changed storage_url.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/vaultik/pulls/329: with no `storage_url`, the local index is now bound to the destination that `s3.endpoint`, `s3.bucket` and `s3.prefix` name, and a change to any of them is refused with the same error and advice as a changed `storage_url`. 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#298