3 # Run a simple backup with encryption and a real sparse file.
5 TestName="sparse-encrypt-test"
10 scripts/copy-crypto-confs
11 echo "${cwd}/build" >${cwd}/tmp/file-list
12 cd ${cwd}/build/src/tools
15 echo "Execute of ${cwd}/build/src/tools/gigaslam failed."
16 rm -f ${cwd}/build/src/tools/gigaslam.gif
21 change_jobname SparseTest $JobName
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 @$out ${cwd}/tmp/log1.out
28 label storage=File volume=TestVolume001
37 @$out ${cwd}/tmp/log2.out
38 @# setdebug level=0 fd
39 restore where=${cwd}/tmp/bacula-restores storage=File
51 check_for_zombie_jobs storage=File
54 if [ ! -f ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif ]; then
55 echo "============= file gigaslam.gif was not restored ======="
58 size=`du ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif | cut -f 1`
59 if [ $size -gt 120 ]; then
60 echo "========== restored sparse file: gigaslam.gif too big ========="
61 echo " size is ${size}K it should be 120K"
68 rm -f ${cwd}/build/src/tools/gigaslam.gif
69 rm -f ${cwd}/build/gigaslam.gif