3 # This script uses the virtual disk autochanger
5 TestName="multi-storage-test"
10 scripts/copy-2disk-confs
11 scripts/prepare-disk-changer
14 if (/^Storage {/) { $in=1; $nb++; }
16 if (/Address / && $in) {$_ = "Address = 127.0.0.$nb\n"; }
18 ' $conf/bacula-dir.conf > $tmp/1
19 cp $tmp/1 $conf/bacula-dir.conf
23 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
24 if test ! -d ${cwd}/tmp/build ; then
25 mkdir ${cwd}/tmp/build
27 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
29 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
30 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
33 change_jobname $JobName
36 # Write out bconsole commands
37 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
40 @$out ${cwd}/tmp/log1.out
41 label storage=DDS-4 volume=TestVolume001 Pool=Default slot=1 drive=0
42 label storage=File volume=TestVolume002 Pool=Default
43 run job=$JobName storage=DDS-4 yes
51 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
52 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
55 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
58 @$out ${cwd}/tmp/log1.out
59 @# Force Incremental on the second Volume
60 run level=Incremental storage=File job=$JobName yes
66 @$out ${cwd}/tmp/log2.out
67 setdebug trace=1 level=110 client
68 setdebug trace=1 level=110 director
69 restore where=${cwd}/tmp/bacula-restores select all done yes
78 check_for_zombie_jobs storage=File
82 check_restore_tmp_build_diff
85 # This script seems to more or less randomly fail, so we
86 # add extra code here to produce a "dump" in the event of
89 if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
90 cat ${cwd}/tmp/log1.out
92 cat ${cwd}/tmp/log2.out
94 diff -r ${cwd}/tmp/build ${cwd}/tmp/bacula-restores${cwd}/tmp/build