3 # Run a simple backup of the Bacula build directory using the compressed option
4 # then backup four times, each with incremental then finally restore.
5 # It should require at least 4 different bsrs.
7 TestName="relabel-tape"
14 scripts/copy-tape-confs
16 echo "${cwd}/build" >${cwd}/tmp/file-list
18 change_jobname $JobName
21 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
24 @$out ${cwd}/tmp/log1.out
25 setdebug level=150 storage=tape
26 label storage=tape volume=TestVolume001 slot=0 pool=Default
27 run job=$JobName level=Full yes
30 add pool=Default storage=tape
33 @# set status to append
34 update volume=TestVolume001
37 run job=$JobName level=Full yes
42 purge volume=TestVolume001
43 relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default storage=tape
48 run job=$JobName level=Full yes
56 check_for_zombie_jobs storage=tape
61 # now do several restores to ensure we cleanup between jobs
63 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
64 @$out ${cwd}/tmp/log2.out
65 setdebug level=150 storage=tape
67 restore where=${cwd}/tmp/bacula-restores select all done
70 restore where=${cwd}/tmp/bacula-restores select all done
73 @$out ${cwd}/tmp/log2.out
75 @# now unmount the tape and start two restores
80 restore where=${cwd}/tmp/bacula-restores select all done
82 restore where=${cwd}/tmp/bacula-restores select
95 check_for_zombie_jobs storage=tape