]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/bscan-test.cmd
Delete unwanted subdirectory
[bacula/bacula] / regress / win32 / tests / bscan-test.cmd
1 REM
2 REM Run a simple backup of the Bacula build directory but 
3 REM   split the archive into two volumes then bscan it
4 REM   into the catalog after the backup. It also to a limited
5 REM   extent tests the purge volume and delete volume commands.
6 REM
7
8 SET TestName=bscan-test
9 SET JobName=bscan
10
11 CALL scripts\functions set_debug 0
12 CALL scripts\functions copy_test_confs
13
14 ECHO %CD:\=/%/build >\tmp\file-list
15
16 CALL scripts\functions change_jobname NightlySave %JobName%
17 CALL scripts\functions start_test
18
19 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\bscan-test.1.bscr >tmp\bconcmds
20
21 CALL scripts\functions run_bacula
22 CALL scripts\functions check_for_zombie_jobs storage=File1
23 CALL scripts\functions stop_bacula
24
25 ECHO volume=TestVolume001^|TestVolume002 >tmp\bscan.bsr
26
27 IF %debug% EQU 1 (
28    bin\bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf %CD:\=/%/tmp | tools\tee tmp\log.out
29 ) ELSE (
30    bin\bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf %CD:\=/%/tmp >nul 2>&1
31 )
32
33 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\bscan-test.2.bscr >tmp\bconcmds
34
35 REM now run restore
36 CALL scripts\functions run_bacula
37 CALL scripts\functions check_for_zombie_jobs storage=File1
38 CALL scripts\functions stop_bacula
39
40 CALL scripts\functions check_two_logs
41 CALL scripts\functions check_restore_diff
42 CALL scripts\functions end_test