mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 03:18:55 +00:00
remove old tests
This commit is contained in:
parent
1216ded14b
commit
a3e0907fc7
@ -1,23 +0,0 @@
|
||||
set -e
|
||||
|
||||
prepare
|
||||
run restic init
|
||||
|
||||
# first backup without dedup
|
||||
run restic backup "${BASE}/fake-data"
|
||||
size=$(du -sm "$RESTIC_REPOSITORY" | cut -f1)
|
||||
debug "size before: $size"
|
||||
|
||||
# second backup with dedup
|
||||
run restic backup "${BASE}/fake-data"
|
||||
size2=$(du -sm "$RESTIC_REPOSITORY" | cut -f1)
|
||||
debug "size after: $size2"
|
||||
|
||||
# check if the repository hasn't grown more than 5%
|
||||
threshhold=$(($size+$size/20))
|
||||
debug "threshhold is $threshhold"
|
||||
if [[ "$size2" -gt "$threshhold" ]]; then
|
||||
fail "dedup failed, repo grown more than 5%, before ${size}MiB after ${size2}MiB threshhold ${threshhold}MiB"
|
||||
fi
|
||||
|
||||
cleanup
|
@ -1,28 +0,0 @@
|
||||
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
|
@ -1,18 +0,0 @@
|
||||
set -e
|
||||
|
||||
prepare
|
||||
run restic init
|
||||
run restic backup "${BASE}/fake-data"
|
||||
run restic restore "$(basename "$RESTIC_REPOSITORY"/snapshots/*)" "${BASE}/fake-data-restore"
|
||||
dirdiff "${BASE}/fake-data" "${BASE}/fake-data-restore/fake-data"
|
||||
|
||||
SNAPSHOT=$(restic list snapshots)
|
||||
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"
|
||||
|
||||
echo "snapshot id is $SNAPSHOT"
|
||||
restic ls "$SNAPSHOT" fake-data/0/0/1 | head -n 10
|
||||
|
||||
run restic fsck -o --check-data
|
||||
cleanup
|
Loading…
Reference in New Issue
Block a user