3 # Run a simple backup of the Bacula build directory but
4 # split the archive into four volumes, two of which are
5 # totally full. I.e. make sure that bsr selects all tapes
6 # including those fully spanned.
9 if test "$debug" -eq 1 ; then
16 scripts/copy-test-confs
18 echo "${cwd}/build" >/tmp/file-list
22 echo " === Starting span-vol-test at `date +%R:%S` ==="
23 echo " === Starting span-vol-test at `date +%R:%S` ===" >working/log
26 cat <<END_OF_DATA >tmp/bconcmds
30 label storage=File1 volume=TestVolume004
31 label storage=File1 volume=TestVolume003
32 label storage=File1 volume=TestVolume002
33 label storage=File1 volume=TestVolume001
34 update Volume=TestVolume004 MaxVolBytes=3000000
35 update Volume=TestVolume003 MaxVolBytes=3000000
36 update Volume=TestVolume002 MaxVolBytes=3000000
37 run job=NightlySave storage=File1 yes
45 restore where=${cwd}/tmp/bacula-restores select storage=File1
56 if test "$debug" -eq 1 ; then
58 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
60 bin/bacula start 2>&1 >/dev/null
61 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
64 scripts/check_for_zombie_jobs storage=File1
65 bin/bacula stop 2>&1 >/dev/null
66 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
68 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
70 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
71 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
74 echo " !!!!! span-vol-test Bacula source failed!!! !!!!! "
75 echo " !!!!! span-vol-test failed!!! !!!!! " >>test.out
76 if [ $bstat != 0 -o $rstat != 0 ] ; then
77 echo " !!!!! Bad Job termination status !!!!! "
78 echo " !!!!! Bad Job termination status !!!!! " >>test.out
80 echo " !!!!! Restored files differ !!!!! "
81 echo " !!!!! Restored files differ !!!!! " >>test.out
85 echo " ===== span-vol-test Bacula source OK `date +%R:%S` ===== "
86 echo " ===== span-vol-test OK `date +%R:%S` ===== " >>test.out