2 REM Run a backup of the full bacula build directory, but with the
3 REM Maximum File Size set. Then do a restore of a few files to kick in
4 REM disk seeking (not yet enabled), and ensure that the restored files
5 REM match. Even though disk seeking is not yet enabled, this is a good test,
6 REM and once it is enabled, this will test it.
8 SET TestName=restore-disk-seek-test
9 SET JobName=restore-disk-seek
11 CALL scripts\functions set_debug 1
12 CALL scripts\functions copy_test_confs
14 ECHO %CD:\=/%/tmp/build >\tmp\file-list
16 IF EXIST tmp\build RD /s /q tmp\build
19 REM Copy only the .c files (to be restored)
20 REM set files to "*.c" for all c files
21 SET files=ua_tree.c ua_update.c
23 FOR %%i in ( %files% ) DO COPY build\src\dird\%%i tmp\build >nul 2>&1
24 DIR /b tmp\build >tmp\1
25 sed -e "s;^;%CD:\=/%/tmp/build/;" tmp\1 >tmp\restore-list
27 REM At this point restore-list contains the list
28 REM of files we will restore
31 REM Now backup *everything*
32 IF EXIST tmp\build RD /s /q tmp\build
34 COPY build\src\dird\* tmp\build >nul 2>&1
35 REM Enable MaximumFileSize
36 COPY bin\bacula-sd.conf tmp\1 >nul 2>&1
37 sed "s;# Maximum File Size; Maximum File Size;" tmp\1 >bin\bacula-sd.conf
39 CALL scripts\functions change_jobname CompressedTest %JobName%
40 CALL scripts\functions start_test
42 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\restore-disk-seek-test.bscr >tmp\bconcmds
44 CALL scripts\functions run_bacula
45 CALL scripts\functions check_for_zombie_jobs storage=File
46 CALL scripts\functions stop_bacula
48 REM Now setup a control directory of only what we *should* restore
51 FOR %%i in ( %files% ) DO COPY build\src\dird\%%i tmp\build >nul 2>&1
53 CALL scripts\functions check_two_logs
54 CALL scripts\functions check_restore_tmp_build_diff
55 CALL scripts\functions end_test