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
6 # the next tape. One minor wrinkle: we create the two tapes
7 # in the Scratch pool, so they should be switched to the Default
9 # We set TestVolume001 to not in the changer, so the algorithm
10 # should find TestVolume002 and use it rather than blocking.
12 # Note we use the viritual disk autochanger
14 TestName="scratch-pool-test"
18 if test x${AUTOCHANGER} = x/dev/null ; then
19 echo "two-volume-test skipped. No autochanger."
24 scripts/copy-2disk-confs
25 scripts/prepare-disk-changer
27 echo "${cwd}/build" >${cwd}/tmp/file-list
29 outf="${cwd}/tmp/sed_tmp"
30 echo "s%# Maximum File Size% Maximum File Size%g" >${outf}
31 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
32 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
34 change_jobname NightlySave $JobName
37 # Write out bconsole commands
38 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
41 @$out ${cwd}/tmp/log1.out
42 label storage=tape volume=TestVolume001 slot=1 pool=Scratch drive=0
43 label storage=tape volume=TestVolume002 slot=2 pool=Scratch drive=0
44 update Volume=TestVolume001 MaxVolBytes=2000000 pool=Scratch drive=0
45 update Volume=TestVolume001 inchanger=no pool=Scratch drive=0
46 @#setdebug level=200 storage=tape
47 llist volume=TestVolume001
48 llist volume=TestVolume002
53 llist volume=TestVolume001
57 @$out ${cwd}/tmp/log2.out
58 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
66 check_for_zombie_jobs storage=tape