3 # Run a simple backup of the Bacula build directory
4 # to two tapes where the maximum tape file size is set to 1M
7 bin/bacula stop 2>&1 >/dev/null
8 scripts/copy-2tape-confs
9 scripts/prepare-two-tapes
10 echo "${cwd}/build" >/tmp/file-list
11 bin/drop_sqlite_tables
12 bin/make_sqlite_tables
14 echo "s%# Maximum File Size% Maximum File Size%g" >${out}
15 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
16 sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
20 echo " === Starting Two Volume Tape test ==="
21 echo " === Starting Two Volume Tape test ===" >>working/log
24 bin/bacula start 2>&1 >/dev/null
25 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
29 label storage=DDS-4 volume=TestVolume001 slot=1
30 label storage=DDS-4 volume=TestVolume002 slot=2
31 update Volume=TestVolume001 MaxVolBytes=3000000
32 run job=NightlySave yes
39 restore where=${cwd}/tmp/bacula-restores select all
46 bin/bacula stop 2>&1 >/dev/null
47 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
49 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
51 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
52 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
55 echo " !!!!! Two Volume Tape test Bacula source failed!!! !!!!! "
56 echo " !!!!! Two Volume Tape test failed!!! !!!!! " >>test.out
59 echo " ===== Two Volume Tape test Bacula source OK ===== "
60 echo " ===== Two Volume Tape test OK ===== " >>test.out