]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/small-file-size-tape
Final changes
[bacula/bacula] / regress / tests / small-file-size-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory 
4 #   to a tape where the maximum tape file size is set to 1M
5 #
6 cwd=`pwd`
7 scripts/copy-tape-confs
8 scripts/cleanup-tape
9
10 echo "${cwd}/build" >/tmp/file-list
11 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
12 sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
13
14 echo " "
15 echo " "
16 echo " === Starting Small File Size test at `date +%R:%S` ==="
17 echo " === Starting Small File Size test at `date +%R:%S` ===" >>working/log
18 echo " "
19
20 bin/bacula start 2>&1 >/dev/null
21 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
22 @output /dev/null
23 messages
24 @output tmp/log1.out
25 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
26 setdebug level=2 storage=DDS-4
27 run job=NightlySave yes
28 wait
29 messages
30 @# 
31 @# now do a restore
32 @#
33 @output tmp/log2.out
34 restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
35 unmark *
36 mark *
37 done
38 yes
39 wait
40 messages
41 @output
42 quit
43 END_OF_DATA
44 scripts/check_for_zombie_jobs storage=DDS-4
45 bin/bacula stop 2>&1 >/dev/null
46 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
47 bstat=$?
48 grep "^  Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
49 rstat=$?
50 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
51 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
52    echo " "
53    echo " "
54    echo "  !!!!! Small File Size test Bacula source failed!!! !!!!! "
55    echo "  !!!!! Small File Size test failed!!! !!!!! " >>test.out
56    echo " "
57 else
58    echo "  ===== Small File Size test Bacula source OK ===== "
59    echo "  ===== Small File Size test OK ===== " >>test.out
60 #  scripts/cleanup
61 fi