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
8 # This script uses the virtual disk autochanger and two drives
11 TestName="three-pool-disk"
12 JobName="threepooldisk"
19 scripts/copy-2disk-drive-confs
20 scripts/prepare-two-disks
22 echo "${cwd}/build" >/tmp/file-list
23 change_jobname NightlySave $JobName
26 # Turn off Prefer Mounted Volumes so we use 2 drives
28 echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
29 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
30 # Comment the next line out to write everything to one drive
31 # otherwise, it writes the two jobs to different drives
32 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
34 # Write out bconsole commands
35 cat <<END_OF_DATA >tmp/bconcmds
39 @#setdebug level=150 storage=DDS-4
40 label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
41 label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Full drive=0
42 label storage=DDS-4 volume=TestVolume003 slot=3 Pool=Inc drive=1
44 run job=$JobName level=Full Pool=Default yes
45 run job=$JobName level=Full Pool=Default yes
46 run job=$JobName level=Full Pool=Default yes
47 run job=$JobName level=Full Pool=Default yes
48 run job=$JobName level=Full Pool=Default yes
63 cat <<END_OF_DATA >tmp/bconcmds
70 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
79 check_for_zombie_jobs storage=DDS-4
82 check_restore_tmp_build_diff