2 REM Run a simple backup of the Bacula build directory
3 REM to two tapes where the maximum tape file size is set to 1M
4 REM Note, this test simulates the tape filling and writing to
5 REM the next tape. One minor wrinkle: we create the two tapes
6 REM in the Scratch pool, so they should be switched to the Default
7 REM Pool automatically.
8 REM We set TestVolume001 to not in the changer, so the algorithm
9 REM should find TestVolume002 and use it rather than blocking.
11 REM Note we use the viritual disk autochanger
13 SET TestName=scratch-pool-test
14 SET JobName=scratch-pool
16 CALL scripts\functions set_debug 0
19 IF "%AUTOCHANGER%" == "nul" (
20 ECHO two-volume-test skipped. No autochanger.
25 CALL scripts\copy-2disk-confs >nul 2>&1
26 CALL scripts\prepare-two-disks
28 ECHO %CD:\=/%/build >\tmp\file-list
30 COPY bin\bacula-sd.conf tmp\1 >nul 2>&1
31 sed -e "s;# Maximum File Size; Maximum File Size;g" tmp\1 >bin\bacula-sd.conf
33 CALL scripts\functions change_jobname NightlySave %JobName%
34 CALL scripts\functions start_test
36 REM Write out bconsole commands
37 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\scratch-pool-test.bscr >tmp\bconcmds
39 CALL scripts\functions run_bacula
40 CALL scripts\functions check_for_zombie_jobs storage=DDS-4
41 CALL scripts\functions stop_bacula
43 CALL scripts\functions check_two_logs
44 CALL scripts\functions check_restore_diff
45 CALL scripts\functions end_test