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 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
26 run job=$JobName level=Full yes
29 add pool=Default storage=DDS-4
32 @# set status to append
33 update volume=TestVolume001
36 run job=$JobName level=Full yes
41 setdebug level=150 storage=DDS-4
42 purge volume=TestVolume001
43 relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default storage=DDS-4
48 setdebug level=0 storage=DDS-4
49 run job=$JobName level=Full yes
58 check_for_zombie_jobs storage=DDS-4
63 # now do several restores to ensure we cleanup between jobs
65 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
68 restore where=${cwd}/tmp/bacula-restores select all done
71 restore where=${cwd}/tmp/bacula-restores select all done
74 @$out ${cwd}/tmp/log2.out
76 @# now unmount the tape and start two restores
80 setdebug level=150 storage=DDS-4
82 restore where=${cwd}/tmp/bacula-restores select all done
84 restore where=${cwd}/tmp/bacula-restores select
98 check_for_zombie_jobs storage=DDS-4