]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-volume-test
Update disk tests
[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 if test x${AUTOCHANGER} = x/dev/null ; then
16    echo "two-volume-test skipped. No autochanger."
17    exit
18 fi
19 cwd=`pwd`
20 scripts/cleanup
21 scripts/copy-2disk-confs
22 scripts/prepare-two-disks
23  
24 echo "${cwd}/build" >/tmp/file-list
25
26 outf="tmp/sed_tmp"
27 echo "s%# Maximum File Size%  Maximum File Size%g" >${outf}
28 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
29 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
30
31 change_jobname NightlySave $JobName
32 start_test
33
34 # Write out bconsole commands
35 cat <<END_OF_DATA >tmp/bconcmds
36 @$out /dev/null
37 messages
38 @$out tmp/log1.out
39 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Default drive=0
40 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
41 update Volume=TestVolume001 MaxVolBytes=3000000 pool=Default drive=0
42 @#setdebug level=1000 client 
43 run job=$JobName yes
44 wait
45 messages
46 @# 
47 @# now do a restore
48 @#
49 @$out tmp/log2.out
50 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 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