]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/incremental-2disk.cmd
Delete unwanted subdirectory
[bacula/bacula] / regress / win32 / tests / incremental-2disk.cmd
1 REM
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.
4 REM
5 REM This script uses the virtual disk autochanger
6 REM
7 SET TestName=incremental-2disk
8 SET JobName=Inc2disk
9
10 CALL scripts\functions set_debug 0
11
12 CALL config_out
13
14 CALL scripts\functions stop_bacula
15
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
19
20 CALL scripts\copy-2disk-confs >nul 2>&1
21 CALL scripts\prepare-two-disks
22
23 ECHO %CD:\=/%/tmp/build >\tmp\file-list
24 IF NOT EXIST tmp\build MKDIR tmp\build
25
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
29
30 CALL scripts\functions change_jobname %JobName%
31 CALL scripts\functions start_test
32
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
35
36 CALL scripts\functions run_bacula
37
38 ECHO ficheriro1.txt >tmp\build\ficheriro1.txt
39 ECHO ficheriro2.txt >tmp\build\ficheriro2.txt
40
41
42 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-2disk.2.bscr >tmp\bconcmds
43
44 CALL scripts\functions run_bconsole
45
46 CALL scripts\functions check_for_zombie_jobs storage=File
47 CALL scripts\functions stop_bacula
48 REM
49 REM Delete .c files because we will only restored the txt files
50 REM
51 DEL tmp\build\*.c
52
53 CALL scripts\functions check_two_logs
54 CALL scripts\functions check_restore_tmp_build_diff
55 CALL scripts\functions end_test