Stop snapshot purge when a snapshot cannot leave the local index (closes #337)
check / check (push) Waiting to run
check / check (push) Waiting to run
snapshot purge, and the purge step of snapshot create --prune, logged a failed local index delete, then deleted that snapshot's metadata from the destination store anyway and exited 0, leaving a local record whose metadata was gone. It now stops at that snapshot with an error, before touching its metadata, so the command exits non-zero; snapshots already purged stay purged. This matches how the same loop already handles a failed metadata delete. Model: opus-5-5
This commit is contained in:
@@ -339,7 +339,9 @@ local index alone, and still exits zero.
|
||||
|
||||
**`snapshot purge`**: Remove old snapshots based on criteria. Retention is
|
||||
per-snapshot-name (`--keep-latest` keeps the latest of each name, not the
|
||||
latest globally).
|
||||
latest globally). If a snapshot cannot be removed from the local index, the
|
||||
command stops there, leaves that snapshot's metadata on the destination store
|
||||
and exits non-zero; `snapshot create --prune` fails the same way.
|
||||
* `--keep-latest`: Keep only the most recent snapshot of each name
|
||||
* `--older-than <duration>`: Remove snapshots older than duration (e.g. `30d`,
|
||||
`4w`, `6mo`, `1y`; `m` is minutes, `mo` is months)
|
||||
|
||||
Reference in New Issue
Block a user