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=tape volume=TestVolume001 slot=1 Pool=Default drive=0
36 label storage=tape volume=TestVolume002 slot=2 Pool=Default drive=1
38 @#setdebug level=120 storage=tape
39 run job=$JobName level=Full yes
41 run job=$JobName level=Full yes
45 update volume=TestVolume001 maxvolbytes=40123123
46 setdebug level=150 storage=tape
47 run job=$JobName level=Full yes
57 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
62 @$out ${cwd}/tmp/log2.out
63 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
71 check_for_zombie_jobs storage=tape