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