Keep the local index when remote nuke cannot list or find the destination (closes #292)
check / check (push) Waiting to run
check / check (push) Waiting to run
`remote nuke` took a destination store it could not list, or one without `vaultik-destination.txt` while the local index held snapshots, as a warning: it then cleared the local snapshot records, and for an unplugged volume's empty mount point reported the store empty and exited zero. Nuke now fails on either before it removes anything, without its advice to run it again, which would fail the same way. The bulk remove it runs fails on either too; only a local-only remove still goes on with a warning. Nuke also deletes each snapshot's remote metadata before its local record, so a failed delete keeps the snapshot in the local index rather than leaving it on the store as a remote-only snapshot. Model: opus-5-5
This commit was merged in pull request #384.
This commit is contained in:
@@ -454,9 +454,14 @@ since `prune` never deletes it.
|
||||
the backup destination store, whatever its name, and then
|
||||
`vaultik-destination.txt`, leaving the bucket prefix empty. Destructive
|
||||
and irreversible. This is the single supported way to wipe the entire
|
||||
destination store. If a listing afterwards still finds anything under
|
||||
`metadata/` or `blobs/`, the command names each object left and exits
|
||||
non-zero; running it again deletes what is left.
|
||||
destination store. A snapshot is removed from the local index only once
|
||||
its metadata is deleted from the destination store. If the destination
|
||||
store cannot be listed, or the local index holds snapshots and the
|
||||
destination has no `vaultik-destination.txt` (an unplugged volume's
|
||||
empty mount point), the command fails before it removes anything. If a
|
||||
listing afterwards still finds anything under `metadata/` or `blobs/`,
|
||||
the command names each object left and exits non-zero; running it again
|
||||
deletes what is left.
|
||||
* `--force`: Required to confirm destruction.
|
||||
|
||||
**`database delete`**: Delete the local SQLite state database file
|
||||
@@ -529,10 +534,11 @@ For an implementation-level view of the internals — the data model, the
|
||||
* `vaultik-destination.txt` holds one fixed line of text, with no host
|
||||
name, path or time. A destination without it is treated as not
|
||||
present while the local index holds snapshots stored there:
|
||||
`snapshot create` refuses to write to it, `prune` and `snapshot purge`
|
||||
fail, and `snapshot list` and `snapshot remove` behave as for a
|
||||
destination that cannot be listed. This keeps an unplugged volume's empty mount point
|
||||
from being taken for a destination whose snapshots are all gone. Mount
|
||||
`snapshot create` refuses to write to it, `prune`, `snapshot purge`
|
||||
and `remote nuke` fail, and `snapshot list` and `snapshot remove`
|
||||
behave as for a destination that cannot be listed. This keeps an
|
||||
unplugged volume's empty mount point from being taken for a
|
||||
destination whose snapshots are all gone. Mount
|
||||
the volume if it is removable; if the destination was emptied on
|
||||
purpose, run `vaultik database delete` and back up again.
|
||||
* Blobs are two-level directory sharded using the first 4 hex chars of the blob hash
|
||||
|
||||
Reference in New Issue
Block a user