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-test"
17 scripts/copy-test-confs
18 echo "${cwd}/build" >${cwd}/tmp/file-list
20 change_jobname CompressedTest $JobName
23 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 estimate job=$JobName listing
29 @$out ${cwd}/tmp/log1.out
30 label storage=File volume=TestVolume001
38 check_for_zombie_jobs storage=File
39 # make some files for the incremental to pick up
40 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
41 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
46 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
49 @$out ${cwd}/tmp/log1.out
57 check_for_zombie_jobs storage=File
59 touch ${cwd}/build/src/dird/*.c
60 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
64 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
67 @$out ${cwd}/tmp/log1.out
75 check_for_zombie_jobs storage=File
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
93 check_for_zombie_jobs storage=File
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 storage=File done
103 restore where=${cwd}/tmp/bacula-restores select all storage=File done
106 @$out ${cwd}/tmp/log2.out
107 restore where=${cwd}/tmp/bacula-restores select storage=File
118 check_for_zombie_jobs storage=File