3 # Run a simple backup of the Bacula build directory but
4 # split the archive into two volumes
7 scripts/copy-test-confs
9 echo "${cwd}/build" >/tmp/file-list
13 echo " === Starting two-vol-test ==="
14 echo " === Starting two-vol-test ===" >working/log
17 bin/bacula start 2>&1 >/dev/null
18 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
22 label storage=File1 volume=TestVolume001
23 label storage=File1 volume=TestVolume002
24 update Volume=TestVolume001 MaxVolBytes=3000000
25 run job=NightlySave storage=File1 yes
32 restore where=${cwd}/tmp/bacula-restores select all storage=File1 done
39 scripts/check_for_zombie_jobs storage=File1
40 bin/bacula stop 2>&1 >/dev/null
41 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
43 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
45 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
46 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
49 echo " !!!!! two-vol-test Bacula source failed!!! !!!!! "
50 echo " !!!!! two-vol-test failed!!! !!!!! " >>test.out
51 if [ $bstat != 0 -o $rstat != 0 ] ; then
52 echo " !!!!! Bad Job termination status !!!!! "
53 echo " !!!!! Bad Job termination status !!!!! " >>test.out
55 echo " !!!!! Restored files differ !!!!! "
56 echo " !!!!! Restored files differ !!!!! " >>test.out
60 echo " ===== two-vol-test Bacula source OK ===== "
61 echo " ===== two-vol-test OK ===== " >>test.out