3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory
9 # to two tapes where the maximum tape file size is set to 1M
10 # Note, this test simulates the tape filling and writing to
13 TestName="two-volume-changer"
21 scripts/copy-2tape-confs
22 scripts/prepare-two-tapes
24 echo "${cwd}/build" >${cwd}/tmp/file-list
27 echo "s%# Maximum File Size% Maximum File Size%g" >${outf}
28 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
29 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
31 change_jobname $JobName
34 # Write out bconsole commands
35 cat <<END_OF_DATA >tmp/bconcmds
39 label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
40 label storage=tape volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
41 update Volume=TestVolume002 MaxVolBytes=3000000 pool=Default drive=$DRIVE1
43 select * from Storage;
44 select VolumeName,InChanger,Slot,StorageId from Media;
46 @#setdebug level=1000 client=$CLIENT
47 setdebug level=150 storage=tape
51 select * from Storage;
52 select VolumeName,InChanger,Slot,StorageId from Media;
59 check_for_zombie_jobs storage=tape
62 $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $SLOT2 ${TAPE_DRIVE} 0
64 cat <<END_OF_DATA >tmp/bconcmds
71 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
79 check_for_zombie_jobs storage=tape