]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-volume-test
ebl add runscript regression script (not yet works well)
[bacula/bacula] / regress / tests / two-volume-test
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 #  Note, this test simulates the tape filling and writing to
6 #   the next tape.
7 #
8 #  Note we use the viritual disk autochanger
9 #
10 TestName="two-volume-test"
11 JobName=TwoVolume
12 . scripts/functions
13 set_debug 0
14 . config.out
15
16 cwd=`pwd`
17 scripts/cleanup
18 scripts/copy-2disk-confs
19 scripts/prepare-two-disks
20  
21 echo "${cwd}/build" >/tmp/file-list
22
23 outf="tmp/sed_tmp"
24 echo "s%# Maximum File Size%  Maximum File Size%g" >${outf}
25 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
26 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
27
28 change_jobname NightlySave $JobName
29 start_test
30
31 # Write out bconsole commands
32 cat <<END_OF_DATA >tmp/bconcmds
33 @$out /dev/null
34 messages
35 @$out tmp/log1.out
36 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Default drive=0
37 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
38 update Volume=TestVolume001 MaxVolBytes=3000000 pool=Default drive=0
39 @#setdebug level=1000 client 
40 run job=$JobName yes
41 wait
42 messages
43 @# 
44 @# now do a restore
45 @#
46 @$out tmp/log2.out
47 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
48 yes
49 wait
50 messages
51 @$out
52 quit
53 END_OF_DATA
54
55 run_bacula
56 check_for_zombie_jobs storage=DDS-4
57 stop_bacula
58
59 check_two_logs
60 check_restore_diff
61 end_test