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 is on a different device from its parent
directory. Under --prune, when an earlier snapshot of that name
recorded such a directory and this run does not find it on a different
device, the run skips the prune, keeps every older snapshot, names the
directory and exits non-zero, as for an empty configured path. For a
volume retired, or a directory no longer backed up, on purpose, the
older snapshots are removed with snapshot purge.

Model: opus-5-5
This commit is contained in:
2026-10-15 03:50:08 +00:00
parent ff50a137dd
commit 4227ef8ba0
17 changed files with 756 additions and 42 deletions
+11 -2
View File
@@ -335,8 +335,17 @@ 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`. A file removed during the backup
does not stop the prune.
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)
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 that directory is no longer backed up, because it is excluded
or its configured path was removed. If the volume was retired or the
directory is no longer backed up on purpose, 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
this duration instead of only the latest (e.g. `4w`, `30d`, `6mo`, `1y`).
Without `--prune`, or with a value that is not a valid duration, the