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 disk that is not loaded. Note, they both have
6 # prefers non-mounted tapes. This should expose bug #801
8 # This test the SD Virtual autochanger feature. It is a disk based
9 # "autochanger", but does not use any changer script.
11 TestName="big-virtual-changer"
12 JobName="bigvirtualchanger"
16 scripts/copy-2disk-drive-confs
17 scripts/prepare-disk-changer
21 echo "${cwd}/build" >${cwd}/tmp/file-list
22 echo "${cwd}/build" >>${cwd}/tmp/file-list
23 echo "${cwd}/build" >>${cwd}/tmp/file-list
24 echo "${cwd}/build" >>${cwd}/tmp/file-list
25 echo "${cwd}/build" >>${cwd}/tmp/file-list
26 echo "${cwd}/build" >>${cwd}/tmp/file-list
27 #change_jobname Virtual $JobName
30 # Turn off Prefer Mounted Volumes so we use 2 drives
31 outf="${cwd}/tmp/sed_tmp"
32 echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
33 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
34 # Comment the next line out to write everything to one drive
35 # otherwise, it writes the two jobs to different drives
36 #sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
38 # Write out bconsole commands
39 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
42 @$out ${cwd}/tmp/log1.out
43 setdebug level=10 storage=Virtual
44 @#setdebug level=200 client=$CLIENT
45 label storage=Virtual volume=TestVolume001 slot=1 Pool=Default drive=0
46 label storage=Virtual volume=TestVolume002 slot=2 Pool=Full drive=0
47 label storage=Virtual volume=TestVolume003 slot=3 Pool=Inc drive=1
48 label storage=Virtual volume=TestVolume004 slot=4 Pool=Default drive=0
49 status storage=Virtual
50 run job=Virtual level=Full Pool=Default yes
51 run job=Virtual level=Full Pool=Default yes
52 run job=Virtual level=Full Pool=Default yes
53 run job=Virtual level=Full Pool=Default yes
54 run job=Virtual level=Full Pool=Default yes
55 run job=Virtual level=Full Pool=Default yes
56 run job=Virtual level=Full Pool=Default yes
57 run job=Virtual level=Full Pool=Default yes
58 run job=Virtual level=Full Pool=Default yes
59 status storage=Virtual
62 status storage=Virtual
65 status storage=Virtual
68 status storage=Virtual
71 status storage=Virtual
74 status storage=Virtual
77 status storage=Virtual
80 status storage=Virtual
83 status storage=Virtual
86 status storage=Virtual
89 status storage=Virtual
92 status storage=Virtual
95 status storage=Virtual
98 status storage=Virtual
104 status storage=Virtual
113 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
119 @$out ${cwd}/tmp/log2.out
120 restore where=${cwd}/tmp/bacula-restores select all storage=Virtual done
129 check_for_zombie_jobs storage=Virtual