]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/three-pool-test
Update tests
[bacula/bacula] / regress / tests / three-pool-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory. Create three
4 #   tapes, each in a different pool, then run two jobs both of which
5 #   want the tape that is not loaded.  Note, they both have     
6 #   prefers non-mounted tapes.  This should expose bug #801
7 #
8 # This script uses the virtual disk autochanger and two drives
9 #
10 . config.out
11 TestName="three-pool-disk"
12 JobName="threepooldisk"
13 . scripts/functions
14
15 scripts/cleanup
16 scripts/copy-2disk-drive-confs
17 scripts/prepare-two-disks
18
19 echo "${cwd}/build" >/tmp/file-list
20 change_jobname NightlySave $JobName
21 start_test
22
23 # Turn off Prefer Mounted Volumes so we use 2 drives
24 outf="tmp/sed_tmp"
25 echo "s%# Prefer Mounted Volumes%  Prefer Mounted Volumes%g" >${outf}
26 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
27 # Comment the next line out to write everything to one drive
28 #  otherwise, it writes the two jobs to different drives
29 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
30
31 # Write out bconsole commands
32 cat <<END_OF_DATA >tmp/bconcmds
33 @output /dev/null
34 messages
35 @$out tmp/log1.out
36 setdebug level=51 storage=DDS-4
37 label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
38 label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Full    drive=0
39 label storage=DDS-4 volume=TestVolume003 slot=3 Pool=Inc     drive=1
40 status storage=DDS-4
41 run job=$JobName level=Full Pool=Default yes
42 run job=$JobName level=Full Pool=Default yes
43 run job=$JobName level=Full Pool=Default yes
44 run job=$JobName level=Full Pool=Default yes
45 run job=$JobName level=Full Pool=Default yes
46 @sleep 10
47 status storage=DDS-4
48 list volumes
49 wait
50 list volumes
51 list jobs
52 status storage=DDS-4
53 messages
54 quit
55 END_OF_DATA
56
57 # exit
58
59 run_bacula
60 cat <<END_OF_DATA >tmp/bconcmds
61 @$out /dev/null
62 messages
63 @# 
64 @# now do a restore
65 @#
66 @$out tmp/log2.out
67 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
68 yes
69 wait
70 messages
71 @$out
72 quit
73 END_OF_DATA
74
75 run_bconsole
76
77 check_for_zombie_jobs storage=DDS-4
78 stop_bacula
79
80 check_two_logs
81 check_restore_diff
82
83 end_test