1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

Sparse file support: create an empty sparse file for in-place restore

This commit is contained in:
Gilbert Chen
2017-07-20 23:08:55 -04:00
parent 1aee9bd6ef
commit d881ac9169
2 changed files with 129 additions and 26 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Testing backup and restore of sparse files
. ./test_functions.sh
fixture
pushd ${TEST_REPO}
${DUPLICACY} init integration-tests $TEST_STORAGE -c 1m
for i in `seq 1 10`; do
dd if=/dev/urandom of=file3 bs=1000 count=1000 seek=$((100000 * $i))
done
ls -lsh file3
${DUPLICACY} backup
${DUPLICACY} check --files -stats
rm file1 file3
${DUPLICACY} restore -r 1
ls -lsh file3
popd