change_jobname NightlySave $JobName
start_test
+# enable the Verified message in the console
+sed '/console =*/ s/, !verified//g' $conf/bacula-dir.conf > $tmp/1
+mv $tmp/1 $conf/bacula-dir.conf
+sed '/director =*/ s/, !verified//g' $conf/bacula-fd.conf > $tmp/1
+mv $tmp/1 $conf/bacula-fd.conf
+
# Create list of files being backed up and verified to compare afterwards
files_listing=${cwd}/tmp/files
find ${cwd}/build -print > ${files_listing}
END_OF_DATA
run_bacula
-
sleep 2
check_for_zombie_jobs storage=File
stop_bacula
-while IFS= read -r line <&3; do
- grep "Veryfying: ${line}" tmp/log1.out > /dev/null
- if [ $? -ne 0 ]; then
- estat=1
- print_debug "Did not found ${line} file in verified files log!"
- print_debug "see: ${cwd}/tmp/log1.out"
- fi
- grep "Veryfying: ${line}" tmp/original > /dev/null
- if [ $? -ne 0 ]; then
- estat=1
- print_debug "Did not found ${line} file in verified files log!"
- print_debug "see: ${cwd}/tmp/original"
- fi
-done 3< ${files_listing}
-
-
-grep "^ Termination: *Verify OK" tmp/log1.out 2>&1 >/dev/null
-bstat=$?
-grep "^ Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
-rstat=$?
-dstat=0
-
# Turn off verbose file listing, rerun verify jobs and check if files are not listed as expected
sed '/console =*/ s/$/, !verified/g' $conf/bacula-dir.conf > $tmp/1
mv $tmp/1 $conf/bacula-dir.conf
-
sed '/director =*/ s/$/, !verified/g' $conf/bacula-fd.conf > $tmp/1
mv $tmp/1 $conf/bacula-fd.conf
check_for_zombie_jobs storage=File
stop_bacula
+while IFS= read -r line <&3; do
+ grep "Veryfying: ${line}" tmp/log1.out > /dev/null
+ if [ $? -ne 0 ]; then
+ estat=1
+ print_debug "Did not found ${line} file in verified files log!"
+ print_debug "see: ${cwd}/tmp/log1.out"
+ fi
+ grep "Veryfying: ${line}" tmp/original > /dev/null
+ if [ $? -ne 0 ]; then
+ estat=1
+ print_debug "Did not found ${line} file in verified files log!"
+ print_debug "see: ${cwd}/tmp/original"
+ fi
+done 3< ${files_listing}
+
+
+grep "^ Termination: *Verify OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^ Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
+rstat=$?
+
while IFS= read -r line <&3; do
grep "Veryfying: ${line}" tmp/log2.out > /dev/null
if [ $? -eq 0 ]; then
estat=1
print_debug "Found ${line} file in verified files log, no files should be listed now!"
print_debug "see: ${cwd}/tmp/log2.out"
+ fi
grep "Veryfying: ${line}" tmp/log3.out > /dev/null
if [ $? -eq 0 ]; then
estat=1
print_debug "Found ${line} file in verified files log, no files should be listed now!"
print_debug "see: ${cwd}/tmp/log3.out"
fi
- fi
done 3< ${files_listing}
end_test
change_jobname NightlySave $JobName
start_test
+# enable the Verified message in the console
+sed '/console =*/ s/, !verified//g' $conf/bacula-dir.conf > $tmp/1
+mv $tmp/1 $conf/bacula-dir.conf
+sed '/director =*/ s/, !verified//g' $conf/bacula-fd.conf > $tmp/1
+mv $tmp/1 $conf/bacula-fd.conf
+
if [ x$FORCE_VOLENC = xyes ]; then
- # force the encryption to be NULL make the sed works
+ # force the encryption to be NULL to make the "sed" of the data work
FORCE_CIPHER=NULL
export FORCE_CIPHER
fi
stop_bacula
-while IFS= read -r line <&3; do
- grep "Veryfying: ${line}" tmp/log2.out > /dev/null
- if [ $? -ne 0 ]; then
- estat=1
- print_debug "Did not found ${line} file in verified files log!"
- print_debug "see: ${cwd}/tmp/log2.out"
- fi
-done 3< ${files_listing}
-
$bperl -e 'add_attribute("$conf/bacula-sd.conf", "BlockChecksum", "no", "Device")'
nbok=2
check_for_zombie_jobs storage=File
stop_bacula
+while IFS= read -r line <&3; do
+ grep "Veryfying: ${line}" tmp/log2.out > /dev/null
+ if [ $? -ne 0 ]; then
+ estat=1
+ print_debug "Did not found ${line} file in verified files log!"
+ print_debug "see: ${cwd}/tmp/log2.out"
+ fi
+done 3< ${files_listing}
while IFS= read -r line <&3; do
grep "Veryfying: ${line}" tmp/log5.out > /dev/null
files_listing=${cwd}/tmp/files
find ${cwd}/build -print > ${files_listing}
-sed -i 's/, *!verified//g' bin/bacula-dir.conf
-sed -i 's/, *!verified//g' bin/bacula-fd.conf
+# enable the Verified message in the console
+sed '/console =*/ s/, !verified//g' $conf/bacula-dir.conf > $tmp/1
+mv $tmp/1 $conf/bacula-dir.conf
+sed '/director =*/ s/, !verified//g' $conf/bacula-fd.conf > $tmp/1
+mv $tmp/1 $conf/bacula-fd.conf
cat <<END_OF_DATA >tmp/bconcmds
@output /dev/null
run_bacula
+
+check_for_zombie_jobs storage=File
+stop_bacula
+
+# Turn off verbose file listing, rerun verify jobs and check if files are not listed as expected
+sed '/console =*/ s/$/, !verified/g' $conf/bacula-dir.conf > $tmp/1
+mv $tmp/1 $conf/bacula-dir.conf
+sed '/director =*/ s/$/, !verified/g' $conf/bacula-fd.conf > $tmp/1
+mv $tmp/1 $conf/bacula-fd.conf
+
+cat <<END_OF_DATA >tmp/bconcmds
+@output /dev/null
+messages
+@$out ${cwd}/tmp/log5.out
+reload
+setdebug level=200 dir tags=sql trace=1
+run job=VerifyVolume yes
+wait
+messages
+@$out ${cwd}/tmp/log6.out
+run job=VerifyVolume level=DiskToCatalog jobid=1
+yes
+wait
+messages
+@$out ${cwd}/tmp/log7.out
+run job=VerifyDiskToCatalog yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+
while IFS= read -r line <&3; do
grep "Veryfying: ${line}" tmp/log2.out > /dev/null
if [ $? -ne 0 ]; then
fi
done 3< ${files_listing}
-check_for_zombie_jobs storage=File
-stop_bacula
-
grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
bstat=$?
grep "^ Termination: *Verify OK" tmp/log2.out 2>&1 >/dev/null
print_info "ERROR: Verify job in error in $tmp/log4.out"
rstat=1
fi
-dstat=0
-
-# Turn off verbose file listing, rerun verify jobs and check if files are not listed as expected
-sed '/console =*/ s/$/, !verified/g' $conf/bacula-dir.conf > $tmp/1
-mv $tmp/1 $conf/bacula-dir.conf
-
-sed '/director =*/ s/$/, !verified/g' $conf/bacula-fd.conf > $tmp/1
-mv $tmp/1 $conf/bacula-fd.conf
-
-cat <<END_OF_DATA >tmp/bconcmds
-@output /dev/null
-messages
-@$out ${cwd}/tmp/log5.out
-reload
-setdebug level=200 dir tags=sql trace=1
-run job=VerifyVolume yes
-wait
-messages
-@$out ${cwd}/tmp/log6.out
-run job=VerifyVolume level=DiskToCatalog jobid=1
-yes
-wait
-messages
-@$out ${cwd}/tmp/log7.out
-run job=VerifyDiskToCatalog yes
-wait
-messages
-quit
-END_OF_DATA
-
-run_bacula
while IFS= read -r line <&3; do
grep "Veryfying: ${line}" tmp/log5.out > /dev/null