3 # Label two tapes, write to the first, then recycle it and destroy
4 # the header. Bacula should discover that, mark the tape in
5 # error and continue onto the second tape.
7 TestName="bad-label-changer"
8 JobName=badlabelchanger
15 scripts/copy-2tape-confs
16 scripts/prepare-two-tapes
18 echo "${cwd}/build" >${cwd}/tmp/file-list
21 #echo "s%# Maximum File Size% Maximum File Size%g" >${outf}
22 #cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
23 #sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
25 change_jobname $JobName
28 # Write out bconsole commands
29 cat <<END_OF_DATA >tmp/bconcmds
33 label storage=tape volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
34 label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
36 @#setdebug level=10 client=$CLIENT
37 setdebug level=150 storage=tape
40 purge volume=TestVolume001
46 check_for_zombie_jobs storage=tape
49 # Overwrite TestVolume001 label
50 init_drive ${TAPE_DRIVE}
52 cat <<END_OF_DATA >tmp/bconcmds
56 run job=$JobName level=Full storage=tape yes
63 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
71 check_for_zombie_jobs storage=tape