3 # Run a simple backup of the Bacula build directory then create some
4 # new files, do an Incremental and restore those two files.
6 TestName="incremental-test"
11 ${rscripts}/copy-test-confs
12 echo "${tmpsrc}" >${tmp}/file-list
14 cp -p ${src}/src/dird/*.c ${tmpsrc}
16 echo "${tmpsrc}/ficheriro1.txt" >restore-list
17 echo "${tmpsrc}/ficheriro2.txt" >>restore-list
20 change_jobname CompressedTest $JobName
23 cat <<END_OF_DATA >${tmp}/bconcmds
27 @#setdebug level=100 storage=File
28 @#setdebug level=200 client
29 @#setdebug level=100 director
30 label storage=File volume=TestVolume001
31 label storage=File volume=TestVolume002
40 check_for_zombie_jobs storage=File
42 # Now create two new files to be restored later
45 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
46 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
48 cat <<END_OF_DATA >${tmp}/bconcmds
52 @# Force Incremental on the second Volume
53 update volume=TestVolume001 VolStatus=Used
54 run level=Differential job=$JobName yes
63 touch ${tmpsrc}/ficheriro1.txt
64 touch ${tmpsrc}/ficheriro2.txt
66 cat <<END_OF_DATA >${tmp}/bconcmds
70 run level=Incremental job=$JobName yes
80 cp -f ficheriro2.txt 1
81 sed "s%a%b%g" 1 >ficheriro2.txt
84 cat <<END_OF_DATA >${tmp}/bconcmds
88 run level=Differential job=$JobName yes
97 touch ${tmpsrc}/ficheriro1.txt
98 touch ${tmpsrc}/ficheriro2.txt
99 cat <<END_OF_DATA >${tmp}/bconcmds
102 @$out ${tmp}/log1.out
103 run level=Incremental job=$JobName yes
112 touch ${tmpsrc}/ficheriro1.txt
113 touch ${tmpsrc}/ficheriro2.txt
114 cat <<END_OF_DATA >${tmp}/bconcmds
117 @$out ${tmp}/log1.out
118 run level=Incremental job=$JobName yes
127 touch ${tmpsrc}/ficheriro1.txt
128 touch ${tmpsrc}/ficheriro2.txt
129 cat <<END_OF_DATA >${tmp}/bconcmds
132 @$out ${tmp}/log1.out
133 run level=Incremental job=$JobName yes
141 touch ${tmpsrc}/ficheriro1.txt
142 touch ${tmpsrc}/ficheriro2.txt
144 cat <<END_OF_DATA >${tmp}/bconcmds
147 @$out ${tmp}/log1.out
148 setdebug level=200 storage=File
149 run level=Incremental job=$JobName yes
155 @$out ${tmp}/log2.out
156 setdebug level=10 storage=File
157 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
167 check_for_zombie_jobs storage=File
172 # Delete .c files because we will only restored the txt files
175 check_restore_tmp_build_diff