1 Commits
Author SHA1 Message Date
clawbot 4227ef8ba0 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
2026-10-15 03:50:08 +00:00
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ Tracks blob upload metrics.
- `INSERT OR REPLACE INTO files` - Update file metadata
- `SELECT * FROM files WHERE path = ?` - Check if file has changed
- `INSERT INTO snapshot_files` - Add file to current snapshot
- `INSERT INTO snapshot_mount_points` - Record each directory on a different filesystem from its parent
- `INSERT OR IGNORE INTO snapshot_mount_points` - Record each directory on a different filesystem from its parent
2. **Chunking** (for changed files)
- `INSERT OR IGNORE INTO chunks` - Store new chunks
+3 -3
View File
@@ -10,9 +10,9 @@ import (
"github.com/stretchr/testify/require"
)
// The device number a real backup reads is the same for two entries of
// one directory and differs between two filesystems. Without it no
// mount point is ever found. See
// The device number a real backup reads is the same for a directory and
// a file in it, and differs between the temp directory and /dev.
// Without it no mount point is ever found. See
// https://git.eeqj.de/sneak/vaultik/issues/395.
func TestDeviceNumberFromStat(t *testing.T) {
t.Parallel()