mirror of
https://github.com/restic/restic.git
synced 2026-10-17 23:18:12 +00:00
Add test for files vanishing between scan and backup
This commit is contained in:
1 parent
7af11eaaae
commit
219c0e82bb
2 files changed
+26
-1
No files matched your search
@@ -21,7 +21,7 @@ test: release debug
|
|||||||
go test -v ./...
|
go test -v ./...
|
||||||
test/run.sh cmd/restic:cmd/dirdiff
|
test/run.sh cmd/restic:cmd/dirdiff
|
||||||
|
|
||||||
test-%: test/test-%.sh
|
test-%: test/test-%.sh release debug
|
||||||
echo $*
|
echo $*
|
||||||
test/run.sh cmd/restic:cmd/dirdiff "test/$@.sh"
|
test/run.sh cmd/restic:cmd/dirdiff "test/$@.sh"
|
||||||
|
|
||||||
|
|||||||
Executable
+25
@@ -0,0 +1,25 @@
|
|||||||
|
set -em
|
||||||
|
|
||||||
|
# setup restic
|
||||||
|
prepare
|
||||||
|
run restic init
|
||||||
|
|
||||||
|
# start backup, break before saving files
|
||||||
|
DEBUG_BREAK=Archiver.Snapshot run restic.debug backup "${BASE}/fake-data" && debug "done"
|
||||||
|
|
||||||
|
# remove file
|
||||||
|
rm -f "${BASE}/fake-data/0/0/9/37"
|
||||||
|
|
||||||
|
# resume backup
|
||||||
|
fg
|
||||||
|
|
||||||
|
# run restic restore "$(basename "$RESTIC_REPOSITORY"/snapshots/*)" "${BASE}/fake-data-restore"
|
||||||
|
# dirdiff "${BASE}/fake-data" "${BASE}/fake-data-restore/fake-data"
|
||||||
|
|
||||||
|
# SNAPSHOT=$(run restic list snapshots)
|
||||||
|
# run restic backup "${BASE}/fake-data" $SNAPSHOT
|
||||||
|
# run restic restore "$(basename "$RESTIC_REPOSITORY"/snapshots/*)" "${BASE}/fake-data-restore-incremental"
|
||||||
|
# dirdiff "${BASE}/fake-data" "${BASE}/fake-data-restore-incremental/fake-data"
|
||||||
|
|
||||||
|
# run restic fsck -o --check-data
|
||||||
|
cleanup
|
||||||
Reference in new issue
Block a user