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 label storage=File volume=TestVolume001
29 label storage=File volume=TestVolume002
37 check_for_zombie_jobs storage=File
39 # Now create two new files to be restored later
42 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
43 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
45 cat <<END_OF_DATA >${tmp}/bconcmds
49 @# Force Incremental on the second Volume
50 update volume=TestVolume001 VolStatus=Used
51 run level=Differential job=$JobName yes
60 touch ${tmpsrc}/ficheriro1.txt
61 touch ${tmpsrc}/ficheriro2.txt
63 cat <<END_OF_DATA >${tmp}/bconcmds
67 run level=Incremental job=$JobName yes
77 cp -f ficheriro2.txt 1
78 sed "s%a%b%g" 1 >ficheriro2.txt
81 cat <<END_OF_DATA >${tmp}/bconcmds
85 run level=Differential job=$JobName yes
94 touch ${tmpsrc}/ficheriro1.txt
95 touch ${tmpsrc}/ficheriro2.txt
96 cat <<END_OF_DATA >${tmp}/bconcmds
100 run level=Incremental job=$JobName yes
109 touch ${tmpsrc}/ficheriro1.txt
110 touch ${tmpsrc}/ficheriro2.txt
111 cat <<END_OF_DATA >${tmp}/bconcmds
114 @$out ${tmp}/log1.out
115 run level=Incremental job=$JobName yes
124 touch ${tmpsrc}/ficheriro1.txt
125 touch ${tmpsrc}/ficheriro2.txt
126 cat <<END_OF_DATA >${tmp}/bconcmds
129 @$out ${tmp}/log1.out
130 run level=Incremental job=$JobName yes
138 touch ${tmpsrc}/ficheriro1.txt
139 touch ${tmpsrc}/ficheriro2.txt
141 cat <<END_OF_DATA >${tmp}/bconcmds
144 @$out ${tmp}/log1.out
145 setdebug level=200 storage=File
146 run level=Incremental job=$JobName yes
152 @$out ${tmp}/log2.out
153 setdebug level=10 storage=File
154 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
164 check_for_zombie_jobs storage=File
169 # Delete .c files because we will only restored the txt files
172 check_restore_tmp_build_diff