]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/eot-fail-tape
44c36d07b9caea0670f17366f3f6a69666c4f57c
[bacula/bacula] / regress / tests / eot-fail-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory 
4 #  to two tapes where the maximum tape file size is set to 1M
5 #
6 TestName="eot-fail-tape"
7 JobName=eotfailtape
8 . scripts/functions
9
10 require_tape_drive
11
12 scripts/cleanup-tape
13 scripts/copy-tape-confs
14  
15 echo "${cwd}/build" >${cwd}/tmp/file-list
16
17 out="${cwd}/tmp/sed_tmp"
18 echo "s%# Maximum File Size%  Maximum File Size%g" >${out}
19 cp -f ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
20 sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
21
22 change_jobname $JobName
23 start_test
24
25 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
26 @output /dev/null
27 messages
28 @$out ${cwd}/tmp/log1.out
29 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
30 update Volume=TestVolume001 MaxVolBytes=3000000
31 run job=$JobName yes
32 wait
33 messages
34 @# 
35 @# now do a restore
36 @#
37 @$out ${cwd}/tmp/log2.out
38 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
39 yes
40 wait
41 messages
42 @tee
43 quit
44 END_OF_DATA
45
46 run_bacula
47 check_for_zombie_jobs storage=DDS-4
48 stop_bacula
49
50 check_two_logs
51 check_restore_diff
52 end_test