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="four-jobs-tape"
19 scripts/copy-tape-confs
20 echo "${cwd}/build" >${cwd}/tmp/file-list
22 change_jobname $JobName
25 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 estimate job=$JobName listing
31 @$out ${cwd}/tmp/log1.out
32 label storage=tape volume=TestVolume001 slot=0 pool=Default
40 scripts/check_for_zombie_jobs storage=tape
41 # make some files for the incremental to pick up
42 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
43 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
48 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
51 @$out ${cwd}/tmp/log1.out
52 run job=$JobName level=Incremental yes
60 scripts/check_for_zombie_jobs storage=tape
61 touch ${cwd}/build/src/dird/*.c
62 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
66 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
69 @$out ${cwd}/tmp/log1.out
70 run job=$JobName level=Incremental yes
78 scripts/check_for_zombie_jobs storage=tape
79 # make some files for the incremental to pick up
80 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
84 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
87 @$out ${cwd}/tmp/log1.out
88 run job=$JobName level=Incremental yes
95 scripts/check_for_zombie_jobs storage=tape
97 # now do several restores to ensure we cleanup between jobs
99 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
101 restore where=${cwd}/tmp/bacula-restores select all done
104 restore where=${cwd}/tmp/bacula-restores select all done
107 @$out ${cwd}/tmp/log2.out
109 @# now unmount the tape and start two restores
113 restore where=${cwd}/tmp/bacula-restores select all done
115 restore where=${cwd}/tmp/bacula-restores select
127 check_for_zombie_jobs storage=tape