3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup with encryption and a real sparse file.
10 TestName="sparse-encrypt-test"
15 scripts/copy-crypto-confs
16 echo "${cwd}/build" >${cwd}/tmp/file-list
17 cd ${cwd}/build/src/tools
20 echo "Execute of ${cwd}/build/src/tools/gigaslam failed."
21 rm -f ${cwd}/build/src/tools/gigaslam.gif
26 change_jobname SparseTest $JobName
29 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
32 @$out ${cwd}/tmp/log1.out
33 label storage=File volume=TestVolume001
42 @$out ${cwd}/tmp/log2.out
43 @# setdebug level=0 fd
44 restore where=${cwd}/tmp/bacula-restores storage=File
56 check_for_zombie_jobs storage=File
59 if [ ! -f ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif ]; then
60 echo "============= file gigaslam.gif was not restored ======="
63 size=`du ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif | cut -f 1`
64 if [ $size -gt 120 ]; then
65 echo "========== restored sparse file: gigaslam.gif too big ========="
66 echo " size is ${size}K it should be 120K"
73 rm -f ${cwd}/build/src/tools/gigaslam.gif
74 rm -f ${cwd}/build/gigaslam.gif