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=DDS-4 volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
34 label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
35 @#setdebug level=10 client=$CLIENT
36 setdebug level=150 storage=DDS-4
39 purge volume=TestVolume001
45 check_for_zombie_jobs storage=DDS-4
48 # Overwrite TestVolume001 label
49 init_drive ${TAPE_DRIVE}
51 cat <<END_OF_DATA >tmp/bconcmds
55 run job=$JobName level=Full storage=DDS-4 yes
62 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
71 check_for_zombie_jobs storage=DDS-4