From: Kern Sibbald Date: Sat, 19 Nov 2005 13:03:55 +0000 (+0000) Subject: Update X-Git-Tag: Release-1.38.2~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=65fc2e1ae885738c3e9941ecc600325718a69e45;p=bacula%2Fbacula Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2596 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/tests/two-pool-tape b/regress/tests/two-pool-tape new file mode 100755 index 0000000000..c95aca9695 --- /dev/null +++ b/regress/tests/two-pool-tape @@ -0,0 +1,82 @@ +#!/bin/sh +# +# This is Arno's test. It uses two pools, two tapes, and +# an autochanger. Note, the Director has three Pools in its +# conf: Default, Full, and Inc. Default is used in the +# NightlySave job by default. What is backed up is what +# is in /tmp/file-list, which is by default the Bacula +# source code (i.e. the build directory). +# +debug=1 +if test "$debug" -eq 1 ; then + out="tee" +else + out="output" +fi +cwd=`pwd` +scripts/cleanup +scripts/copy-2tape-confs +scripts/prepare-two-tapes + +echo "${cwd}/build" >/tmp/file-list + +echo " " +echo " " +echo " === Starting Two Pool Tape test at `date +%R:%S` ===" +echo " === Starting Two Pool Tape test at `date +%R:%S` ===" >>working/log +echo " " +# Write out bconsole commands to a file +cat <tmp/bconcmds +@$out /dev/null +messages +@$out tmp/log1.out +label storage=DDS-4 volume=TestVolume001 slot=1 pool=Default drive=0 +label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0 +@#setdebug level=1000 client +run job=NightlySave yes +@sleep 10 +run job=NightlySave level=Full pool=Full yes +wait +messages +@# +@# now do a restore +@# +@$out tmp/log2.out +restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done +yes +wait +messages +@$out +quit +END_OF_DATA + +# start Bacula and run bconsole commands +if test "$debug" -eq 1 ; then + bin/bacula start + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + bin/bacula start 2>&1 >/dev/null + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi +# Make sure no jobs are still running (debug check) +scripts/check_for_zombie_jobs storage=DDS-4 + +# stop Bacula +bin/bacula stop 2>&1 >/dev/null +# Check if backup done correctly +grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +bstat=$? +grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null +rstat=$? +diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then + echo " " + echo " " + echo " !!!!! Two Pool Tape test Bacula source failed!!! !!!!! " + echo " !!!!! Two Pool Tape test failed!!! !!!!! " >>test.out + echo " " +else + echo " ===== Two Pool Tape test Bacula source OK ===== " + echo " ===== Two Pool Tape test OK ===== " >>test.out +# scripts/cleanup +fi