]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fixed-block-size-tape
regress: Add test for bvfs-test with deleted files
[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=tape
39 label storage=tape 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=tape
48 unmark *
49 mark *
50 done
51 yes
52 wait
53 messages
54 quit
55 END_OF_DATA
56
57 run_bacula
58 check_for_zombie_jobs storage=tape
59 stop_bacula
60
61 check_two_logs
62 check_restore_diff
63 end_test