]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/eot-fail-tape
Skip lzo-test if lzo not in Bacula
[bacula/bacula] / regress / tests / eot-fail-tape
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 #
9 TestName="eot-fail-tape"
10 JobName=eotfailtape
11 . scripts/functions
12
13 require_tape_drive
14
15 scripts/cleanup-tape
16 scripts/copy-tape-confs
17  
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19
20 outf="${cwd}/tmp/sed_tmp"
21 echo "s%# Maximum File Size%  Maximum File Size%g" >${outf}
22 cp -f ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
23 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
24
25 change_jobname $JobName
26 start_test
27
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
29 @$out /dev/null
30 messages
31 @$out tmp/log1.out
32 label storage=tape volume=TestVolume001 slot=0 pool=Default
33 @#update Volume=TestVolume001 MaxVolBytes=3000000
34 run job=$JobName yes
35 wait
36 messages
37 @# 
38 @# now do a restore
39 @#
40 @$out tmp/log2.out
41 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
42 yes
43 wait
44 messages
45 quit
46 END_OF_DATA
47
48 run_bacula
49 check_for_zombie_jobs storage=tape
50 stop_bacula
51
52 check_two_logs
53 check_restore_diff
54 end_test