3 # Set prefer mounted volumes to no to try to force use of
6 # This script uses the virtual disk autochanger and two drives
13 scripts/copy-2disk-drive-confs
14 scripts/prepare-two-disks
16 change_jobname NightlySave $JobName
19 echo "${cwd}/build" >${cwd}/tmp/file-list
21 # Turn off Prefer Mounted Volumes so we use 2 drives
22 outf="${cwd}/tmp/sed_tmp"
23 echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
24 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
25 # Comment the next line out to write everything to one drive
26 # otherwise, it writes the two jobs to different drives
27 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
29 # Write out bconsole commands
30 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
33 @$out ${cwd}/tmp/log1.out
34 label storage=DDS-4 volume=TestVolume001 slot=2 Pool=Default drive=0
35 label storage=DDS-4 volume=TestVolume002 slot=1 Pool=Default drive=1
37 @#unmount storage=DDS-4 drive=0
38 @#unmount storage=DDS-4 drive=1
39 @#mount storage=DDS-4 slot=2 drive=0
40 @#mount storage=DDS-4 slot=1 drive=1
42 setdebug level=120 storage=DDS-4
43 run job=$JobName level=Full yes
45 run job=$JobName level=Full yes
57 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
62 @$out ${cwd}/tmp/log2.out
63 @#unmount storage=DDS-4 drive=0
64 @#unmount storage=DDS-4 drive=1
65 @#mount storage=DDS-4 slot=1 drive=0
66 @#mount storage=DDS-4 slot=2 drive=1
67 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
76 check_for_zombie_jobs storage=DDS-4