3 # Run a simple backup of the Bacula build directory
4 # to two tapes where the maximum tape file size is set to 1M
5 # Note, this test simulates the tape filling and writing to
10 scripts/copy-2tape-confs
11 scripts/prepare-two-tapes
13 echo "${cwd}/build" >/tmp/file-list
16 echo "s%# Maximum File Size% Maximum File Size%g" >${out}
17 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
18 sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
22 echo " === Starting Two Volume Tape test at `date +%R:%S` ==="
23 echo " === Starting Two Volume Tape test at `date +%R:%S` ===" >>working/log
26 bin/bacula start 2>&1 >/dev/null
27 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
31 label storage=DDS-4 volume=TestVolume001 slot=1
32 label storage=DDS-4 volume=TestVolume002 slot=2
33 update Volume=TestVolume001 MaxVolBytes=3000000
34 run job=NightlySave yes
41 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
48 scripts/check_for_zombie_jobs storage=DDS-4
50 bin/bacula stop 2>&1 >/dev/null
51 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
53 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
55 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
56 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
59 echo " !!!!! Two Volume Tape test Bacula source failed!!! !!!!! "
60 echo " !!!!! Two Volume Tape test failed!!! !!!!! " >>test.out
63 echo " ===== Two Volume Tape test Bacula source OK ===== "
64 echo " ===== Two Volume Tape test OK ===== " >>test.out