3 # Run a simple backup of the Bacula build directory then create some
4 # new files, do an Incremental and restore those two files.
5 # test the bvfs interface
12 ${rscripts}/copy-test-confs
13 echo "${tmpsrc}" >${tmp}/file-list
14 echo "${cwd}/build" >> ${tmp}/file-list
17 cp -p ${src}/src/dird/*.c ${tmpsrc}
19 echo "${tmpsrc}/ficheriro1.txt" >restore-list
20 echo "${tmpsrc}/ficheriro2.txt" >>restore-list
23 change_jobname CompressedTest $JobName
26 cat <<END_OF_DATA >${tmp}/bconcmds
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 run level=Incremental job=$JobName yes
153 @$out ${tmp}/log2.out
154 setdebug level=10 storage=File
155 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
175 ${cwd}/build/src/tools/bvfs_test -T -p ${tmpsrc} -j 1,2,3,4,5,6,7,8 \
176 -w "$working" -n "$db_name" -u "$db_user" -P "$db_password"
178 ${cwd}/build/src/tools/bvfs_test -p ${cwd}/build/ -j 1,2,3,4,5,6,7,8 \
179 -w "$working" -n "$db_name" -u "$db_user" -P "$db_password"
181 ${cwd}/build/src/tools/bvfs_test -p ${tmpsrc} -j 1,2,3,4,5,6,7,8 \
182 -w "$working" -n "$db_name" -u "$db_user" -P "$db_password" \
183 -f ficheriro1.txt -c ${HOST}-fd