# Run a accurate backup of the Bacula build directory
# then restore it.
#
+
TestName="accurate-test"
JobName=backup
. scripts/functions
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
+setdebug level=10 storage=File
restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done
yes
wait
check_two_logs
check_restore_diff
+check_files_written ${cwd}/tmp/log1.out 4
rm -rf ${cwd}/tmp/bacula-restores
check_two_logs
check_restore_diff
+check_files_written ${cwd}/tmp/log1.out 3
rm -rf ${cwd}/tmp/bacula-restores
check_two_logs
check_restore_diff
+check_files_written ${cwd}/tmp/log1.out 2
rm -rf ${cwd}/tmp/bacula-restores
check_two_logs
check_restore_diff
+check_files_written ${cwd}/tmp/log1.out 2
rm -rf ${cwd}/tmp/bacula-restores
check_two_logs
check_restore_diff
+check_files_written ${cwd}/tmp/log1.out 2
rm -rf ${cwd}/tmp/bacula-restores
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
+setdebug level=10 storage=File
restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done
yes
wait
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
+setdebug level=10 storage=File
restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done
yes
wait
run_bconsole
check_for_zombie_jobs storage=File
+check_files_written ${cwd}/tmp/log1.out 3
check_two_logs
check_restore_diff
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
+setdebug level=10 storage=File
restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done
yes
wait
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
+setdebug level=10 storage=File
restore fileset=FS_TESTJOB_ADVANCE where=${cwd}/tmp/bacula-restores select all done
yes
wait
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
+setdebug level=10 storage=File
restore fileset=FS_TESTJOB_ADVANCE where=${cwd}/tmp/bacula-restores select all done
yes
wait
check_two_logs
check_restore_diff
+check_files_written ${cwd}/tmp/log1.out 1
rm -rf ${cwd}/tmp/bacula-restores