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
10 bin/bacula stop 2>&1 >/dev/null
12 ./drop_bacula_tables >/dev/null 2>&1
13 ./make_bacula_tables >/dev/null 2>&1
14 ./grant_bacula_privileges 2>&1 >/dev/null
19 echo " === Starting two-vol-test ==="
20 echo " === Starting two-vol-test ===" >working/log
23 bin/bacula start 2>&1 >/dev/null
24 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
28 label storage=File1 volume=TestVolume001
29 label storage=File1 volume=TestVolume002
30 update Volume=TestVolume001 MaxVolBytes=3000000
31 run job=NightlySave storage=File1 yes
38 restore where=${cwd}/tmp/bacula-restores select all storage=File1
45 bin/bacula stop 2>&1 >/dev/null
46 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
48 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
50 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
51 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
54 echo " !!!!! two-vol-test Bacula source failed!!! !!!!! "
55 echo " !!!!! two-vol-test failed!!! !!!!! " >>test.out
58 echo " ===== two-vol-test Bacula source OK ===== "
59 echo " ===== two-vol-test OK ===== " >>test.out