Refuse a backup destination an unplugged volume left empty (closes #239)
check / check (push) Successful in 14m4s
check / check (push) Successful in 14m4s
Every backup now writes vaultik-destination.txt at the destination root. While the local index holds snapshots, a destination without it is not present: snapshot create refuses before writing, prune and snapshot purge fail, and snapshot list and snapshot remove warn. remote nuke deletes the marker last. The file:// backend no longer creates its destination directory and checks for it on every write; that protects a directory on a removable volume, not the mount point itself. Tests back up into existing directories; fixtures standing for a written destination carry the marker. Judgement call: the marker is rewritten on every backup. Deviation: for the complexity limit, snapshot name selection left CreateSnapshot and the --force/--json test moved into confirmRemoveSnapshot, both unchanged. Model: opus-5-5
This commit is contained in:
@@ -29,7 +29,7 @@ func TestRestoreAndDeepVerifyRejectSwappedDatabase(t *testing.T) {
|
||||
|
||||
fs := afero.NewOsFs()
|
||||
tempDir := t.TempDir()
|
||||
storeDir := filepath.Join(tempDir, "remote")
|
||||
storeDir := t.TempDir()
|
||||
|
||||
chunkSize := int64(64 * 1024)
|
||||
|
||||
@@ -100,7 +100,7 @@ func TestDeepVerifyRejectsSwappedDatabaseWithEmptyManifest(t *testing.T) {
|
||||
|
||||
fs := afero.NewOsFs()
|
||||
tempDir := t.TempDir()
|
||||
storeDir := filepath.Join(tempDir, "remote")
|
||||
storeDir := t.TempDir()
|
||||
|
||||
chunkSize := int64(64 * 1024)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user