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
39 check_for_zombie_jobs storage=File
41 # Now create two new files to be restored later
44 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
45 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
47 cat <<END_OF_DATA >${tmp}/bconcmds
51 @# Force Incremental on the second Volume
52 update volume=TestVolume001 VolStatus=Used
53 run level=Differential job=$JobName yes
62 touch ${tmpsrc}/ficheriro1.txt
63 touch ${tmpsrc}/ficheriro2.txt
65 cat <<END_OF_DATA >${tmp}/bconcmds
69 run level=Incremental job=$JobName yes
79 cp -f ficheriro2.txt 1
80 sed "s%a%b%g" 1 >ficheriro2.txt
83 cat <<END_OF_DATA >${tmp}/bconcmds
87 run level=Differential job=$JobName yes
96 touch ${tmpsrc}/ficheriro1.txt
97 touch ${tmpsrc}/ficheriro2.txt
98 cat <<END_OF_DATA >${tmp}/bconcmds
101 @$out ${tmp}/log1.out
102 run level=Incremental job=$JobName yes
111 touch ${tmpsrc}/ficheriro1.txt
112 touch ${tmpsrc}/ficheriro2.txt
113 cat <<END_OF_DATA >${tmp}/bconcmds
116 @$out ${tmp}/log1.out
117 run level=Incremental job=$JobName yes
126 touch ${tmpsrc}/ficheriro1.txt
127 touch ${tmpsrc}/ficheriro2.txt
128 cat <<END_OF_DATA >${tmp}/bconcmds
131 @$out ${tmp}/log1.out
132 run level=Incremental job=$JobName yes
140 touch ${tmpsrc}/ficheriro1.txt
141 touch ${tmpsrc}/ficheriro2.txt
143 cat <<END_OF_DATA >${tmp}/bconcmds
146 @$out ${tmp}/log1.out
147 setdebug level=200 storage=File
148 run level=Incremental job=$JobName yes
154 @$out ${tmp}/log2.out
155 setdebug level=10 storage=File
156 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
165 check_for_zombie_jobs storage=File
170 # Delete .c files because we will only restored the txt files
173 check_restore_tmp_build_diff