mirror of
https://github.com/restic/restic.git
synced 2026-05-20 09:05:23 +00:00
Bugfix: Backup changed data in incremental mode
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
set -e
|
||||
|
||||
prepare
|
||||
run restic init
|
||||
|
||||
# create testfile
|
||||
echo "testfile" > ${BASE}/fake-data/file
|
||||
|
||||
# run first backup
|
||||
run restic backup "${BASE}/fake-data"
|
||||
|
||||
# remember snapshot id
|
||||
SNAPSHOT=$(run restic list snapshots)
|
||||
|
||||
# add data to testfile
|
||||
date >> ${BASE}/fake-data/file
|
||||
|
||||
# run backup again
|
||||
run restic backup "${BASE}/fake-data"
|
||||
|
||||
# add data to testfile
|
||||
date >> ${BASE}/fake-data/file
|
||||
|
||||
# run incremental backup
|
||||
run restic backup -p "$SNAPSHOT" "${BASE}/fake-data"
|
||||
|
||||
run restic fsck -o --check-data
|
||||
cleanup
|
||||
@@ -7,7 +7,7 @@ run restic restore "$(basename "$RESTIC_REPOSITORY"/snapshots/*)" "${BASE}/fake-
|
||||
dirdiff "${BASE}/fake-data" "${BASE}/fake-data-restore/fake-data"
|
||||
|
||||
SNAPSHOT=$(run restic list snapshots)
|
||||
run restic backup "${BASE}/fake-data" $SNAPSHOT
|
||||
run restic backup -p "$SNAPSHOT" "${BASE}/fake-data"
|
||||
run restic restore "$(basename "$RESTIC_REPOSITORY"/snapshots/*)" "${BASE}/fake-data-restore-incremental"
|
||||
dirdiff "${BASE}/fake-data" "${BASE}/fake-data-restore-incremental/fake-data"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user