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 script uses the virtual disk autochanger and two drives
10 TestName="virtual-changer-disk"
11 JobName="virtualchangerdisk"
15 scripts/copy-2disk-drive-confs
16 scripts/prepare-two-disks
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19 #change_jobname Virtual $JobName
22 # Turn off Prefer Mounted Volumes so we use 2 drives
23 outf="${cwd}/tmp/sed_tmp"
24 echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
25 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
26 # Comment the next line out to write everything to one drive
27 # otherwise, it writes the two jobs to different drives
28 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
30 # Write out bconsole commands
31 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
34 @$out ${cwd}/tmp/log1.out
35 @#setdebug level=200 storage=Virtual
36 @#setdebug level=200 client
37 label storage=Virtual volume=TestVolume001 slot=1 Pool=Default drive=0
38 label storage=Virtual volume=TestVolume002 slot=2 Pool=Full drive=0
39 label storage=Virtual volume=TestVolume003 slot=3 Pool=Inc drive=1
40 status storage=Virtual
41 run job=Virtual level=Full Pool=Default yes
42 run job=Virtual level=Full Pool=Default yes
43 run job=Virtual level=Full Pool=Default yes
44 run job=Virtual level=Full Pool=Default yes
45 run job=Virtual level=Full Pool=Default yes
47 status storage=Virtual
52 status storage=Virtual
60 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
66 @$out ${cwd}/tmp/log2.out
67 restore where=${cwd}/tmp/bacula-restores select all storage=Virtual done
77 check_for_zombie_jobs storage=Virtual