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 scripts/copy-test-confs
11 echo "${cwd}/build" >/tmp/file-list
15 echo " === Starting span-vol-test at `date +%R:%S` ==="
16 echo " === Starting span-vol-test at `date +%R:%S` ===" >working/log
19 bin/bacula start 2>&1 >/dev/null
20 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
24 label storage=File1 volume=TestVolume001
25 label storage=File1 volume=TestVolume002
26 label storage=File1 volume=TestVolume003
27 label storage=File1 volume=TestVolume004
28 update Volume=TestVolume001 MaxVolBytes=3000000
29 update Volume=TestVolume002 MaxVolBytes=3000000
30 update Volume=TestVolume003 MaxVolBytes=3000000
31 run job=NightlySave storage=File1 yes
39 restore where=${cwd}/tmp/bacula-restores select storage=File1
49 scripts/check_for_zombie_jobs storage=File1
50 bin/bacula stop 2>&1 >/dev/null
51 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
53 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
55 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
56 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
59 echo " !!!!! span-vol-test Bacula source failed!!! !!!!! "
60 echo " !!!!! span-vol-test failed!!! !!!!! " >>test.out
61 if [ $bstat != 0 -o $rstat != 0 ] ; then
62 echo " !!!!! Bad Job termination status !!!!! "
63 echo " !!!!! Bad Job termination status !!!!! " >>test.out
65 echo " !!!!! Restored files differ !!!!! "
66 echo " !!!!! Restored files differ !!!!! " >>test.out
70 echo " ===== span-vol-test Bacula source OK ===== "
71 echo " ===== span-vol-test OK ===== " >>test.out