3 # Run a simple backup of the Bacula build directory
4 # to a tape where we set the minimum and maximum block
8 bin/bacula stop 2>&1 >/dev/null
9 scripts/copy-tape-confs
11 echo "${cwd}/build" >/tmp/file-list
13 ./drop_bacula_tables >/dev/null 2>&1
14 ./make_bacula_tables >/dev/null 2>&1
15 ./grant_bacula_privileges 2>&1 >/dev/null
17 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
18 echo "s%# Maximum Block Size% Maximum Block Size%" >${cwd}/tmp/2
19 echo "s%# Minimum Block Size% Minimum Block Size%" >>${cwd}/tmp/2
20 sed -f ${cwd}/tmp/2 ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
21 rm -f ${cwd}/tmp/1 ${cwd}/tmp/2
25 echo " === Starting Fixed Block Size test ==="
26 echo " === Starting Fixed Block Size test ===" >>working/log
29 bin/bacula start 2>&1 >/dev/null
30 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
34 label storage=DDS-4 volume=TestVolume001 slot=0
35 run job=NightlySave yes
42 restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
52 scripts/check_for_zombie_jobs storage=DDS-4
53 bin/bacula stop 2>&1 >/dev/null
54 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
56 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
58 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
59 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
62 echo " !!!!! Fixed Block Size test Bacula source failed!!! !!!!! "
63 echo " !!!!! Fixed Block Size test failed!!! !!!!! " >>test.out
66 echo " ===== Fixed Block Size test Bacula source OK ===== "
67 echo " ===== Fixed Block Size test OK ===== " >>test.out