3 # Run a simple backup of the Bacula build directory
4 # to two tapes where the maximum tape file size is set to 1M
5 # Note, this test simulates the tape filling and writing to
8 TestName="two-volume-changer"
16 scripts/copy-2tape-confs
17 scripts/prepare-two-tapes
19 echo "${cwd}/build" >${cwd}/tmp/file-list
22 echo "s%# Maximum File Size% Maximum File Size%g" >${outf}
23 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
24 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
26 change_jobname $JobName
29 # Write out bconsole commands
30 cat <<END_OF_DATA >tmp/bconcmds
34 label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
35 label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
36 update Volume=TestVolume002 MaxVolBytes=3000000 pool=Default drive=$DRIVE1
38 select * from Storage;
39 select VolumeName,InChanger,Slot,StorageId from Media;
41 @#setdebug level=1000 client=$CLIENT
42 setdebug level=150 storage=DDS-4
46 select * from Storage;
47 select VolumeName,InChanger,Slot,StorageId from Media;
54 check_for_zombie_jobs storage=DDS-4
57 $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $SLOT2 ${TAPE_DRIVE} 0
59 cat <<END_OF_DATA >tmp/bconcmds
66 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
75 check_for_zombie_jobs storage=DDS-4