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