3 # Run a simple backup of the Bacula build directory using the Sparse option
7 scripts/copy-test-confs
9 echo "${cwd}/build" >/tmp/file-list
10 bin/bacula stop 2>&1 >/dev/null
14 echo " === Starting sparse-compressed-test ==="
15 echo " === Starting sparse-compressed-test ===" >>working/log
18 bin/bacula start 2>&1 >/dev/null
19 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
23 label storage=File volume=TestVolume001
24 run job=SparseCompressedTest yes
31 restore where=${cwd}/tmp/bacula-restores select all storage=File done
38 scripts/check_for_zombie_jobs storage=File
39 bin/bacula stop 2>&1 >/dev/null
40 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
42 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
44 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
45 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
48 echo " !!!!! sparse-compressed-test Bacula source failed!!! !!!!! "
49 echo " !!!!! sparse-compressed-test failed!!! !!!!! " >>test.out
50 if [ $bstat != 0 -o $rstat != 0 ] ; then
51 echo " !!!!! Bad Job termination status !!!!! "
52 echo " !!!!! Bad Job termination status !!!!! " >>test.out
54 echo " !!!!! Restored files differ !!!!! "
55 echo " !!!!! Restored files differ !!!!! " >>test.out
59 echo " ===== sparse-compressed-test Bacula source OK ===== "
60 echo " ===== sparse-compressed-test OK ===== " >>test.out