]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fixed-block-size-tape
Update
[bacula/bacula] / regress / tests / fixed-block-size-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory 
4 #   to a tape where we set the minimum and maximum block
5 #   sizes.
6 #
7 TestName="fixed-block-size-tape"
8 JobName=fixedblocksize
9 . scripts/functions
10
11 copy_tape_confs
12
13 echo "${cwd}/build" >/tmp/file-list
14
15 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
16 echo "s%# Maximum Block Size%  Maximum Block Size%" >${cwd}/tmp/2
17 echo "s%# Minimum Block Size%  Minimum Block Size%" >>${cwd}/tmp/2
18 sed -f ${cwd}/tmp/2 ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
19 if [ $? != 0 ] ; then
20    echo " "
21    echo " "
22    echo "!!!! sed problem in Fixed Block Size test !!!!!"
23    echo " "
24    exit 1
25 fi
26 rm -f ${cwd}/tmp/1 ${cwd}/tmp/2
27
28 change_jobname NightlySave $JobName
29 start_test
30
31
32 cat <<END_OF_DATA >tmp/bconcmds
33 @$out /dev/null
34 messages
35 @$out tmp/log1.out
36 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
37 run job=$JobName yes
38 wait
39 messages
40 @# 
41 @# now do a restore
42 @#
43 @$out tmp/log2.out
44 restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
45 unmark *
46 mark *
47 done
48 yes
49 wait
50 messages
51 @$out
52 quit
53 END_OF_DATA
54
55 run_bacula
56 check_for_zombie_jobs storage=DDS-4
57 stop_bacula
58
59 check_two_logs
60 check_restore_diff
61 end_test