3 # Run a simple backup of the Bacula build directory but
4 # split the archive into two volumes
7 if test "$debug" -eq 1 ; then
14 scripts/copy-test-confs
16 echo "${cwd}/build" >/tmp/file-list
20 echo " === Starting two-vol-test at `date +%R:%S` ==="
21 echo " === Starting two-vol-test at `date +%R:%S` ===" >working/log
24 cat <<END_OF_DATA >tmp/bconcmds
28 label storage=File1 volume=TestVolume002
29 label storage=File1 volume=TestVolume001
30 update Volume=TestVolume002 MaxVolBytes=3000000
31 run job=NightlySave storage=File1 yes
38 restore where=${cwd}/tmp/bacula-restores select all storage=File1 done
46 if test "$debug" -eq 1 ; then
48 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
50 bin/bacula start 2>&1 >/dev/null
51 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
54 scripts/check_for_zombie_jobs storage=File1
55 bin/bacula stop 2>&1 >/dev/null
56 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
58 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
60 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
61 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
64 echo " !!!!! two-vol-test Bacula source failed!!! !!!!! "
65 echo " !!!!! two-vol-test failed!!! !!!!! " >>test.out
66 if [ $bstat != 0 -o $rstat != 0 ] ; then
67 echo " !!!!! Bad Job termination status !!!!! "
68 echo " !!!!! Bad Job termination status !!!!! " >>test.out
70 echo " !!!!! Restored files differ !!!!! "
71 echo " !!!!! Restored files differ !!!!! " >>test.out
75 echo " ===== two-vol-test Bacula source OK `date +%R:%S` ===== "
76 echo " ===== two-vol-test OK `date +%R:%S` ===== " >>test.out