Do not prune when a backup misses an earlier mount point (closes #395)
check / check (push) Waiting to run

snapshot create --prune purged the older snapshots holding a volume's
files when the volume, mounted below a configured path, was not
mounted: its empty mount point read as deleted files.

The scan now records in the local index each directory at or below a
configured path that holds an entry and is on a different device from
its parent directory, looked up once the walk has listed it, as listing
mounts an automounted volume. Under --prune, when an earlier snapshot
of that name recorded such a directory and this run does not, the run
skips the prune, keeps every older snapshot and exits non-zero, naming
the directory. For a volume retired on purpose, snapshot purge removes
the older snapshots.

Model: opus-5-5
This commit is contained in:
2026-10-15 04:55:32 +00:00
committed by sneak
parent ff50a137dd
commit 9ffb6df721
17 changed files with 940 additions and 46 deletions
+10
View File
@@ -335,6 +335,16 @@ value where a list belongs or a word where a number belongs), is refused.
either: every older snapshot is kept, and the command names the path and
exits non-zero, on every run until the path holds something again. Take a
path that is empty on purpose out of the config, or remove the older
snapshots by hand with `snapshot purge`. When an earlier snapshot of the
same name in the local index found a volume mounted at or below a
configured path (a directory on a different filesystem from its parent,
with something in it) and this backup finds none mounted there, the prune
does not run either: every older snapshot is kept, and the command names
the directory and exits non-zero, on every run until the volume is mounted
again. The same happens when the volume is empty, as an automounted volume
that could not be mounted looks, or when that directory is no longer
backed up, because it is excluded or its configured path was removed. If
any of this is on purpose, as for a retired volume, remove the older
snapshots by hand with `snapshot purge`. A file removed during the backup
does not stop the prune.
* `--keep-newer-than <duration>`: With `--prune`, keep snapshots newer than