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 at `date +%R:%S` ==="
14 echo " === Starting two-vol-test at `date +%R:%S` ===" >working/log
17 bin/bacula start 2>&1 >/dev/null
19 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 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 update Volume=TestVolume001 MaxVolBytes=3000000
27 run job=NightlySave storage=File1 yes
34 restore where=${cwd}/tmp/bacula-restores select all storage=File1 done
41 scripts/check_for_zombie_jobs storage=File1
42 bin/bacula stop 2>&1 >/dev/null
43 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
45 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
47 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
48 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
51 echo " !!!!! two-vol-test Bacula source failed!!! !!!!! "
52 echo " !!!!! two-vol-test failed!!! !!!!! " >>test.out
53 if [ $bstat != 0 -o $rstat != 0 ] ; then
54 echo " !!!!! Bad Job termination status !!!!! "
55 echo " !!!!! Bad Job termination status !!!!! " >>test.out
57 echo " !!!!! Restored files differ !!!!! "
58 echo " !!!!! Restored files differ !!!!! " >>test.out
62 echo " ===== two-vol-test Bacula source OK ===== "
63 echo " ===== two-vol-test OK ===== " >>test.out