3 # Run a simple backup of the Bacula build directory but
4 # split the archive into two volumes, then restore
5 # files on only one of the volumes and ensure that
6 # the other volume is not used.
9 scripts/copy-test-confs
11 echo "${cwd}/build" >/tmp/file-list
12 bin/bacula stop 2>&1 >/dev/null
13 bin/drop_sqlite_tables
14 bin/make_sqlite_tables
18 echo " === Starting bsr-opt-test ==="
19 echo " === Starting bsr-opt-test ===" >working/log
22 bin/bacula start 2>&1 >/dev/null
23 bin/console -c bin/console.conf <<END_OF_DATA
31 update Volume=TestVolume001
35 run job=NightlySave storage=File1
43 restore where=${cwd}/tmp/bacula-restores current
45 cd ${cwd}/build/src/cats
55 bin/bacula stop 2>&1 >/dev/null
56 grep TestVolume001 working/restore.bsr
58 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
60 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
62 diff -r build/src/cats tmp/bacula-restores${cwd}/build/src/cats
63 if [ $? != 0 -o $bsrstat != 1 -o $bstat != 0 -o $rstat != 0 ] ; then
66 echo " !!!!! bsr-opt-test Bacula source failed!!! !!!!! "
67 echo " !!!!! bsr-opt-test failed!!! !!!!! " >>test.out
70 echo " ===== bsr-opt-test Bacula source OK ===== "
71 echo " ===== bsr-opt-test OK ===== " >>test.out