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="four-jobs-tape"
14 scripts/copy-tape-confs
15 echo "${cwd}/build" >${cwd}/tmp/file-list
17 change_jobname $JobName
20 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
22 estimate job=$JobName listing
26 @$out ${cwd}/tmp/log1.out
27 label storage=tape volume=TestVolume001 slot=0 pool=Default
35 scripts/check_for_zombie_jobs storage=tape
37 # make some files for the incremental to pick up
38 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
39 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
44 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
47 @$out ${cwd}/tmp/log1.out
48 run job=$JobName level=Incremental yes
56 scripts/check_for_zombie_jobs storage=tape
58 touch ${cwd}/build/src/dird/*.c
59 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
63 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
66 @$out ${cwd}/tmp/log1.out
67 run job=$JobName level=Incremental yes
75 scripts/check_for_zombie_jobs storage=tape
77 # make some files for the incremental to pick up
78 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
82 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
85 @$out ${cwd}/tmp/log1.out
86 run job=$JobName level=Incremental yes
93 scripts/check_for_zombie_jobs storage=tape
96 # now do several restores to ensure we cleanup between jobs
98 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
100 restore where=${cwd}/tmp/bacula-restores select all done
103 restore where=${cwd}/tmp/bacula-restores select all done
106 @$out ${cwd}/tmp/log2.out
108 @# now unmount the tape and start two restores
112 restore where=${cwd}/tmp/bacula-restores select all done
114 restore where=${cwd}/tmp/bacula-restores select
126 check_for_zombie_jobs storage=tape