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 autochanger and two tapes
7 SET TestName=incremental-2tape
9 CALL scripts\functions set_debug 0
12 IF "%AUTOCHANGER%" == "nul" (
13 ECHO incremental-2tape test skipped. No autochanger.
17 CALL scripts\functions stop_bacula
18 CALL drop_bacula_tables >nul 2>&1
19 CALL make_bacula_tables >nul 2>&1
20 CALL grant_bacula_privileges >nul 2>&1
22 CALL scripts\copy-2tape-confs
23 CALL scripts\cleanup-2tape
24 ECHO %CD:\=/%/tmp/build >\tmp\file-list
25 IF NOT EXIST tmp\build MKDIR tmp\build
26 COPY build\src\dird\*.c tmp\build
27 ECHO %CD:\=/%/tmp/build/ficheriro1.txt>tmp\restore-list
28 ECHO %CD:\=/%/tmp/build/ficheriro2.txt>>tmp\restore-list
30 CALL scripts\functions start_test
32 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-2tape.1.bscr >tmp\bconcmds
34 CALL scripts\functions run_bacula
36 ECHO ficheriro1.txt >tmp\build\ficheriro1.txt
37 ECHO ficheriro2.txt >tmp\build\ficheriro2.txt
39 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-2tape.2.bscr >tmp\bconcmds
40 CALL scripts\functions run_bconsole
41 CALL scripts\bacula stop_bacula
42 CALL scripts\bacula check_two_logs
44 REM Delete .c files because we will only restore the txt files
47 CALL scripts\bacula check_restore_tmp_build_diff
48 CALL scripts\bacula end_test