2 REM Run a simple backup of the Bacula build directory using the compressed option
3 REM then restore a few selected files.
5 SETLOCAL ENABLEDELAYEDEXPANSION
6 SET TestName=restore2-by-file-test
7 SET JobName=restore2byfile
9 CALL scripts\functions set_debug 0
10 CALL scripts\functions copy_test_confs
12 ECHO %CD:\=/%/build >\tmp\file-list
13 sed -e "s;^;%CD:\=/%;" scripts/flist >tmp\restore2-list
15 CALL scripts\functions change_jobname CompressedTest %JobName%
16 CALL scripts\functions start_test
18 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\restore2-by-file-test.bscr >tmp\bconcmds
20 CALL scripts\functions run_bacula
21 CALL scripts\functions check_for_zombie_jobs storage=File
22 CALL scripts\functions stop_bacula
24 CALL scripts\functions check_two_logs
26 FOR /f %%i IN ( tmp\restore2-list ) DO (
28 diff %%i tmp/bacula-restores/!SUBDIR::=!
29 IF %ERRORLEVEL% NEQ 0 SET dstat=1
31 CALL scripts\functions end_test