#!/bin/sh
#
# TODO:
-# - test bls
# - test bextract
-# - test bscan
# - with strip path
#
# Run a accurate backup of the Bacula build directory
@output /dev/null
messages
label volume=TestVolume001 storage=File pool=Default
-label volume=TestVolume002 storage=File pool=Default
messages
END_OF_DATA
# Check with bls
################################################################
-${cwd}/bin/bls -c ${cwd}/bin/bacula-sd.conf -V 'TestVolume001|TestVolume002' FileStorage > tmp/bls.out
+${cwd}/bin/bls -c ${cwd}/bin/bacula-sd.conf -V 'TestVolume001' FileStorage > tmp/bls.out
if ! grep -- '----' tmp/bls.out | grep xxx > /dev/null
then
bstat=2
cd ..
echo "volume=TestVolume001" >tmp/bscan.bsr
-echo "volume=TestVolume002" >>tmp/bscan.bsr
-${cwd}/bin/bscan -c ${cwd}/bin/bacula-sd.conf -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > /dev/null
+${cwd}/bin/bscan -c ${cwd}/bin/bacula-sd.conf -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > ${cwd}/tmp/bscan.log
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out ${cwd}/tmp/log1.out
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out ${cwd}/tmp/log1.out
+label volume=TestVolume002 storage=File pool=Default
run job=backup_advance yes
wait
messages