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-1t1d-tape"
12 scripts/copy-tape-confs
13 echo "${cwd}/build" >${cwd}/tmp/file-list
15 change_jobname $JobName
18 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
20 estimate job=$JobName listing
21 estimate job=$JobName listing
22 estimate job=$JobName listing
24 @$out ${cwd}/tmp/log1.out
25 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
31 if test "$debug" -eq 1 ; then
33 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
35 bin/bacula start 2>&1 >/dev/null
36 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
39 scripts/check_for_zombie_jobs storage=DDS-4
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
57 if test "$debug" -eq 1 ; then
59 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
61 bin/bacula start 2>&1 >/dev/null
62 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
65 scripts/check_for_zombie_jobs storage=DDS-4
67 touch ${cwd}/build/src/dird/*.c
68 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
72 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
75 @$out ${cwd}/tmp/log1.out
76 run job=$JobName level=Incremental yes
81 if test "$debug" -eq 1 ; then
83 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
85 bin/bacula start 2>&1 >/dev/null
86 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
89 scripts/check_for_zombie_jobs storage=DDS-4
91 # make some files for the incremental to pick up
92 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
96 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
99 @$out ${cwd}/tmp/log1.out
100 run job=$JobName level=Incremental yes
105 if test "$debug" -eq 1 ; then
107 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
109 bin/bacula start 2>&1 >/dev/null
110 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
113 scripts/check_for_zombie_jobs storage=DDS-4
116 # now do several restores to ensure we cleanup between jobs
118 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
120 restore where=${cwd}/tmp/bacula-restores select all done
123 restore where=${cwd}/tmp/bacula-restores select all done
126 @$out ${cwd}/tmp/log2.out
128 @# now unmount the tape and start two restores
131 unmount storage=DDS-4
132 restore where=${cwd}/tmp/bacula-restores select all done
134 restore where=${cwd}/tmp/bacula-restores select
147 check_for_zombie_jobs storage=DDS-4