2 REM Run a simple backup of the Bacula build directory then create some
3 REM new files, do an Incremental and restore those two files.
5 REM This script uses the virtual disk autochanger
7 SET TestName=incremental-2disk
10 CALL scripts\functions set_debug 0
14 CALL scripts\functions stop_bacula
16 CALL bin\drop_bacula_tables >nul 2>&1
17 CALL bin\make_bacula_tables >nul 2>&1
18 CALL bin\grant_bacula_privileges >nul 2>&1
20 CALL scripts\copy-2disk-confs >nul 2>&1
21 CALL scripts\prepare-two-disks
23 ECHO %CD:\=/%/tmp/build >\tmp\file-list
24 IF NOT EXIST tmp\build MKDIR tmp\build
26 COPY build\src\dird\*.c tmp\build >nul 2>&1
27 ECHO %CD:\=/%/tmp/build/ficheriro1.txt>tmp\restore-list
28 ECHO %CD:\=/%/tmp/build/ficheriro2.txt>>tmp\restore-list
30 CALL scripts\functions change_jobname %JobName%
31 CALL scripts\functions start_test
33 REM Write out bconsole commands
34 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-2disk.1.bscr >tmp\bconcmds
36 CALL scripts\functions run_bacula
38 ECHO ficheriro1.txt >tmp\build\ficheriro1.txt
39 ECHO ficheriro2.txt >tmp\build\ficheriro2.txt
42 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-2disk.2.bscr >tmp\bconcmds
44 CALL scripts\functions run_bconsole
46 CALL scripts\functions check_for_zombie_jobs storage=File
47 CALL scripts\functions stop_bacula
49 REM Delete .c files because we will only restored the txt files
53 CALL scripts\functions check_two_logs
54 CALL scripts\functions check_restore_tmp_build_diff
55 CALL scripts\functions end_test