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" >/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 >tmp/bconcmds
28 label storage=File volume=TestVolume001
38 @# setdebug level=0 fd
39 restore where=${cwd}/tmp/bacula-restores storage=File
52 check_for_zombie_jobs storage=File
55 if [ ! -f ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif ]; then
56 echo "============= file gigaslam.gif was not restored ======="
59 size=`du ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif | cut -f 1`
60 if [ $size -gt 120 ]; then
61 echo "========== restored sparse file: gigaslam.gif too big ========="
62 echo " size is ${size}K it should be 120K"
69 rm -f ${cwd}/build/src/tools/gigaslam.gif
70 rm -r ${cwd}/build/gigaslam.gif