Do not prune after a backup that found a configured path empty (closes #388)
check / check (push) Waiting to run

snapshot create --prune of a snapshot whose path was an empty
directory, as the mount point of a volume that is not mounted is,
recorded an empty snapshot and then purged the older snapshots that
held the data, with their blobs.

The scan now counts the entries it finds in each configured path.
Under --prune, a run in which a path of a snapshot it made held
nothing skips the prune, keeps every older snapshot, names each such
path with its snapshot, and exits non-zero, as
#382 does for unreadable
files. A configured path that is a symlink whose target is gone fails
the run. Only the current run is looked at. Without --prune nothing
changes.

Model: opus-5-5
This commit is contained in:
2026-10-14 22:40:37 +00:00
parent 6a57750a7b
commit 6c3f199b41
7 changed files with 416 additions and 47 deletions
+9 -1
View File
@@ -325,7 +325,13 @@ value where a list belongs or a word where a number belongs), is refused.
`--skip-errors` skipped a file or directory it could not read or list, the
prune does not run and every older snapshot is kept, since one of them may
be the only one that holds what was skipped; the command says so and exits
non-zero. A file removed during the backup does not stop the prune.
non-zero. A file removed during the backup does not stop the prune. The
same holds when the backup found nothing in a configured path, as in the
mount point of a volume that is not mounted: the prune does not run, 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`.
* `--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
@@ -334,6 +340,8 @@ value where a list belongs or a word where a number belongs), is refused.
does not exist, or when the local index holds snapshots and the
destination has no `vaultik-destination.txt` (see
[remote storage layout](#remote-storage-layout))
* Fails, before anything is pruned, when a configured path is a symlink
whose target does not exist, as one into a volume that is not mounted
**`snapshot list`**: Show every snapshot known to this host — the union
of the local index and the backup destination store — with timestamps