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
13 echo " === Starting sparse-test `date +%R:%S` ==="
14 echo " === Starting sparse-test `date +%R:%S` ===" >>working/log
17 bin/bacula start 2>&1 >/dev/null
18 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
22 label storage=File volume=TestVolume001
23 run job=SparseTest yes
30 restore where=${cwd}/tmp/bacula-restores select storage=File
40 scripts/check_for_zombie_jobs storage=File
41 bin/bacula stop 2>&1 >/dev/null
42 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
44 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
46 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
47 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
50 echo " !!!!! sparse-test Bacula source failed!!! !!!!! "
51 echo " !!!!! sparse-test failed!!! !!!!! " >>test.out
52 if [ $bstat != 0 -o $rstat != 0 ] ; then
53 echo " !!!!! Bad Job termination status !!!!! "
54 echo " !!!!! Bad Job termination status !!!!! " >>test.out
56 echo " !!!!! Restored files differ !!!!! "
57 echo " !!!!! Restored files differ !!!!! " >>test.out
61 echo " ===== sparse-test Bacula source OK ===== "
62 echo " ===== sparse-test OK ===== " >>test.out