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-disk-changer
17 change_jobname NightlySave $JobName
20 echo "${cwd}/build" >${cwd}/tmp/file-list
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 label storage=DDS-4 volume=TestVolume001 slot=2 Pool=Default drive=0
36 label storage=DDS-4 volume=TestVolume002 slot=1 Pool=Default drive=1
38 @#unmount storage=DDS-4 drive=0
39 @#unmount storage=DDS-4 drive=1
40 @#mount storage=DDS-4 slot=2 drive=0
41 @#mount storage=DDS-4 slot=1 drive=1
43 setdebug level=120 storage=DDS-4
44 run job=$JobName level=Full yes
46 run job=$JobName level=Full yes
58 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
63 @$out ${cwd}/tmp/log2.out
64 @#unmount storage=DDS-4 drive=0
65 @#unmount storage=DDS-4 drive=1
66 @#mount storage=DDS-4 slot=1 drive=0
67 @#mount storage=DDS-4 slot=2 drive=1
68 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
77 check_for_zombie_jobs storage=DDS-4