3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory using the compressed option
9 # then backup four times, each with incremental then finally restore.
10 # It should require at least 4 different bsrs.
12 TestName="relabel-tape"
19 scripts/copy-tape-confs
21 echo "${cwd}/build" >${cwd}/tmp/file-list
23 change_jobname $JobName
26 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
29 @$out ${cwd}/tmp/log1.out
30 setdebug level=150 storage=tape
31 label storage=tape volume=TestVolume001 slot=0 pool=Default
32 run job=$JobName level=Full yes
35 add pool=Default storage=tape
38 @# set status to append
39 update volume=TestVolume001
42 run job=$JobName level=Full yes
47 purge volume=TestVolume001
48 relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default storage=tape
53 run job=$JobName level=Full yes
61 check_for_zombie_jobs storage=tape
65 # now do several restores to ensure we cleanup between jobs
67 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
68 @$out ${cwd}/tmp/log2.out
69 setdebug level=150 storage=tape
71 restore where=${cwd}/tmp/bacula-restores select all done
74 restore where=${cwd}/tmp/bacula-restores select all done
77 @$out ${cwd}/tmp/log2.out
79 @# now unmount the tape and start two restores
84 restore where=${cwd}/tmp/bacula-restores select all done
86 restore where=${cwd}/tmp/bacula-restores select
99 check_for_zombie_jobs storage=tape