repofs kinda working

This commit is contained in:
2023-06-08 23:54:49 +02:00
parent f7a5c4af48
commit a70ca528e0
4 changed files with 21 additions and 10 deletions

View File

@@ -120,6 +120,9 @@ AIDS=()
OUT=$($CMD list --repo testdir/to1 --password asdff)
echo "$OUT"
mkdir testmount
$CMD mount --repo testdir/to1 --password asdff --to testmount &
while IFS= read -r l; do
((i++))
aid=$(echo $l | grep -Eo '[0-9]+' | tail -1)
@@ -129,9 +132,16 @@ while IFS= read -r l; do
echo "Archive not restored properly!"
exit 1
fi
if ! diff --no-dereference -r testmount/$((aid)) testdir/res$((i)); then
echo "Archive not mounted properly!"
exit 1
fi
echo "Restore $((i)) OK"
done <<< "$OUT"
umount testmount
OUT=$($CMD diff --from testdata/4 --repo testdir/to1 --password asdff --progress none --verbose 1 --aid ${AIDS[0]} --aid2 ${AIDS[1]})
echo "$OUT"
if ! ( ( echo "$OUT" | grep -q 'c is different' ) && ! ( echo "$OUT" | grep -q 'a is different' ) && ! ( echo "$OUT" | grep -q 'l is different' )\
@@ -290,5 +300,6 @@ echo "Backup 11 ok"
rm -rf testdata
rm -rf testdir
rm -rf testmount
exit 0