3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory. Create three
9 # tapes, each in a different pool, then run some jobs asking for the
10 # volume on drive three. It should find it without moving the
13 # This script uses the virtual disk autochanger and two drives
15 TestName="2drive-3pool-test"
16 JobName="2dr3pooldisk"
20 scripts/copy-2disk-drive-confs
21 scripts/prepare-disk-changer
24 echo "${cwd}/build" >${cwd}/tmp/file-list
25 change_jobname NightlySave $JobName
27 rm -f working/disk-changer.log
29 # Turn off Prefer Mounted Volumes so we use 2 drives
31 # echo "s%# Prefer Mounted Volumes% Prefer Mounted Volumes%g" >${outf}
32 # cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
33 # Comment the next line out to write everything to one drive
34 # otherwise, it writes the two jobs to different drives
35 # sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
37 # Write out bconsole commands
38 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
41 @$out ${cwd}/tmp/log1.out
42 @#setdebug level=51 storage=tape
43 label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
44 label storage=tape volume=TestVolume002 slot=2 Pool=Full drive=1
45 @#label storage=tape volume=TestVolume003 slot=3 Pool=Inc drive=2
47 @#run job=$JobName level=Full Pool=Inc yes
48 setdebug level=15 storage=tape
49 @#setdebug level=50 dir
50 run job=$JobName level=Full Pool=Full yes
51 run job=$JobName level=Full Pool=Default yes
52 run job=$JobName level=Full Pool=Default yes
53 run job=$JobName level=Full Pool=Default yes
68 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
74 @$out ${cwd}/tmp/log2.out
75 setdebug level=0 storage=tape
77 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
86 check_for_zombie_jobs storage=tape