From: Eric Bollengier Date: Thu, 27 May 2010 12:50:54 +0000 (+0200) Subject: regress: Reproduce #1582 about multiple devices restore X-Git-Tag: Release-5.0.3~176 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=267a54e5345d2aabe6ec39cac6fb6a2b2709eb19;p=bacula%2Fbacula regress: Reproduce #1582 about multiple devices restore --- diff --git a/regress/tests/multi2-storage-test b/regress/tests/multi2-storage-test index 3f2a418be6..b89ae29e2d 100755 --- a/regress/tests/multi2-storage-test +++ b/regress/tests/multi2-storage-test @@ -13,9 +13,9 @@ scripts/prepare-disk-changer # create a new bacula-sd.confs for i in 2 3 4; do perl -ne "\$i='$i';\$tmp='$tmp';"' + if (/Name =/ ) { $_ =~ s/-sd/-$i-sd/} if (/SDPort = /) { $_ =~ s/(\d+)/1810$i/} - if (/Name = /) { $_ =~ s/FileStorage/FileStorage$i/} - if (/mediatype = /) { $_ =~ s/FileMedia/FileMedia$1/} + if (/mediatype = /) { $_ =~ s/FileMedia/FileMedia$i/} if (/WorkingDirectory/) { $_ =~ s:working:tmp/$i:} if (/Pid Directory/) { $_ =~ s:working:tmp/$i:} if (/(Archive|Changer) Device/) { $_ =~ s:$tmp:$tmp/$i:} @@ -46,6 +46,13 @@ echo "${cwd}/build" >${cwd}/tmp/file-list change_jobname $JobName start_test +# Start SDs +for sd in 2 3 4; do + $tmp/bacula-ctl-sd$sd stop &> /dev/null + $tmp/bacula-ctl-sd$sd start &> /dev/null +done + + # Write out bconsole commands cat <${cwd}/tmp/bconcmds @out /dev/null @@ -59,26 +66,25 @@ label storage=File4 volume=File4-Vol001 Pool=Default run job=$JobName storage=tape yes wait messages +@exec "touch $cwd/build/po/fr.po" run job=$JobName storage=File yes wait messages +@exec "touch $cwd/build/po/de.po" run job=$JobName storage=File2 yes wait messages +@exec "touch $cwd/build/po/it.po" run job=$JobName storage=File3 yes wait messages +@exec "touch $cwd/build/po/es.po" run job=$JobName storage=File4 yes wait messages quit END_OF_DATA -# Start SDs -for sd in 2 3 4; do - $tmp/bacula-ctl-sd$sd start &> /dev/null -done - run_bacula echo "ficheriro1.txt" >${cwd}/build/po/ficheriro1.txt @@ -90,15 +96,19 @@ cat <${cwd}/tmp/bconcmds messages @$out ${cwd}/tmp/log1.out @# Force Incremental on the second Volume +@exec "touch $cwd/build/po/fi.po" run level=Incremental storage=File job=$JobName yes wait messages +@exec "touch $cwd/build/po/uk.po" run level=Incremental storage=File2 job=$JobName yes wait messages +@exec "touch $cwd/build/po/sv.po" run level=Incremental storage=File3 job=$JobName yes wait messages +@exec "touch $cwd/build/po/README" run level=Incremental storage=File4 job=$JobName yes wait messages @@ -111,6 +121,13 @@ setdebug trace=1 level=110 director restore where=${cwd}/tmp/bacula-restores select all done yes wait messages +@$out ${cwd}/tmp/status.out +status all +@exec "touch $cwd/build/po/POTFILES" +@$out ${cwd}/tmp/log1.out +run level=Incremental storage=File4 job=$JobName yes +wait +messages show storage sql select * FROM Storage;