3 # Run a simple backup of the Bacula build directory
4 # to a tape where the maximum tape file size is set to 1M
7 bin/bacula stop 2>&1 >/dev/null
8 scripts/copy-tape-confs
10 echo "${cwd}/build" >/tmp/file-list
11 bin/drop_sqlite_tables
12 bin/make_sqlite_tables
13 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
14 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
18 echo " === Starting Small File Size test ==="
19 echo " === Starting Small File Size test ===" >>working/log
22 bin/bacula start 2>&1 >/dev/null
23 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
27 label storage=DDS-4 volume=TestVolume001 slot=0
28 run job=NightlySave yes
35 restore where=${cwd}/tmp/bacula-restores select all
42 bin/bacula stop 2>&1 >/dev/null
43 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
45 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
47 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
48 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
51 echo " !!!!! Small File Size test Bacula source failed!!! !!!!! "
52 echo " !!!!! Small File Size test failed!!! !!!!! " >>test.out
55 echo " ===== Small File Size test Bacula source OK ===== "
56 echo " ===== Small File Size test OK ===== " >>test.out