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 # Note we use the viritual disk autochanger
15 TestName="two-volume-test"
21 scripts/copy-2disk-confs
22 scripts/prepare-disk-changer
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 NightlySave $JobName
34 # Write out bconsole commands
35 cat <<END_OF_DATA >tmp/bconcmds
39 label storage=tape volume=TestVolume001 slot=1 pool=Default drive=0
40 label storage=tape volume=TestVolume002 slot=2 pool=Default drive=0
41 update Volume=TestVolume001 MaxVolBytes=3000000 pool=Default drive=0
43 select * from Storage;
44 select VolumeName,InChanger,slot,StorageId from Media;
46 @#setdebug level=1000 client=$CLIENT
52 select VolumeName,InChanger,slot,StorageId from Media;
54 update slots scan storage=tape
57 select * from Storage;
58 select VolumeName,InChanger,slot,StorageId from Media;
59 select jobid,mediaid,startblock,endblock from JobMedia;
65 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
73 check_for_zombie_jobs storage=tape