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"
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=DDS-4 volume=TestVolume001 slot=0 pool=Default
33 if test "$debug" -eq 1 ; then
35 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
37 bin/bacula start 2>&1 >/dev/null
38 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
41 scripts/check_for_zombie_jobs storage=DDS-4
43 # make some files for the incremental to pick up
44 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
45 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
50 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
53 @$out ${cwd}/tmp/log1.out
54 run job=$JobName level=Incremental yes
59 if test "$debug" -eq 1 ; then
61 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
63 bin/bacula start 2>&1 >/dev/null
64 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
67 scripts/check_for_zombie_jobs storage=DDS-4
69 touch ${cwd}/build/src/dird/*.c
70 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
74 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
77 @$out ${cwd}/tmp/log1.out
78 run job=$JobName level=Incremental yes
83 if test "$debug" -eq 1 ; then
85 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
87 bin/bacula start 2>&1 >/dev/null
88 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
91 scripts/check_for_zombie_jobs storage=DDS-4
93 # make some files for the incremental to pick up
94 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
98 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
101 @$out ${cwd}/tmp/log1.out
102 run job=$JobName level=Incremental yes
107 if test "$debug" -eq 1 ; then
109 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
111 bin/bacula start 2>&1 >/dev/null
112 cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
115 scripts/check_for_zombie_jobs storage=DDS-4
118 # now do several restores to ensure we cleanup between jobs
120 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
122 restore where=${cwd}/tmp/bacula-restores select all done
125 restore where=${cwd}/tmp/bacula-restores select all done
128 @$out ${cwd}/tmp/log2.out
130 @# now unmount the tape and start two restores
133 unmount storage=DDS-4
134 restore where=${cwd}/tmp/bacula-restores select all done
136 restore where=${cwd}/tmp/bacula-restores select
149 check_for_zombie_jobs storage=DDS-4