JobName=Relabeltape
. scripts/functions
+require_tape_drive
+
scripts/cleanup-tape
scripts/copy-tape-confs
+
echo "${cwd}/build" >${cwd}/tmp/file-list
change_jobname $JobName
@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
+setdebug level=150 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=$JobName level=Full yes
wait
.
run job=$JobName level=Full yes
wait
+list volumes
unmount storage=DDS-4
unmount storage=DDS-4
-@#setdebug level=150 storage=DDS-4
purge volume=TestVolume001
relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default storage=DDS-4
list volumes
wait
run job=$JobName level=Full yes
wait
+list volumes
messages
@$out
quit
# now do several restores to ensure we cleanup between jobs
#
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@$out ${cwd}/tmp/log2.out
+setdebug level=150 storage=DDS-4
+list volumes
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
@# now unmount the tape and start two restores
@# at the same time
@#
+list volumes
unmount storage=DDS-4
restore where=${cwd}/tmp/bacula-restores select all done
yes