#
# Run all tape tests
#
-. config.out
+. ./config.out
if test ! x$AUTOCHANGER = x/dev/null ; then
mtx -f $AUTOCHANGER load 1 >/dev/null &2>/dev/null
fi
cp test.out test1.out
tests/test0
tests/backup-bacula-tape
-tests/bscan-tape
tests/btape-fill-tape
tests/fixed-block-size-tape
tests/four-concurrent-jobs-tape
tests/truncate-bug-tape
tests/two-pool-tape
tests/2drive-incremental-2tape
+#tests/bscan-tape
echo " "
echo " "
echo "Test results"
fi
}
+run_bscan()
+{
+ if test "$debug" -eq 1 ; then
+ bin/bscan $* | tee tmp/log.out
+ else
+ bin/bscan $* 2>&1 >/dev/null
+ fi
+}
+
stop_bacula()
{
# file or directory names in the Include directive of the
# FileSet resource.
#
-# For Bacula release 1.33
+# For Bacula release 1.39.23
#
# You might also want to change the default email address
# from root to your address. See the "mail" and "operator"
#
Director { # define myself
- Name = rufus-dir
+ Name = localhost-dir
DIRport = 8101 # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
#
# Default Bacula Storage Daemon Configuration file
#
-# For Bacula release 1.33
+# For Bacula release 1.39.23
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# List Directors who are permitted to contact Storage daemon
#
Director {
- Name = rufus-dir
+ Name = localhost-dir
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
}
@output /dev/null
messages
@$out tmp/log1.out
+@#setdebug level=200 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
purge volume=TestVolume001
relabel pool=Default storage=DDS-4 oldVolume=TestVolume001 volume=TestVolume002 slot=0
--- /dev/null
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory using the compressed option
+# then backup four times, each with incremental then
+# do a bscan and restore.
+# It should require at least 4 different bsrs.
+#
+TestName="bscan-tape"
+JobName=bscantape
+. scripts/functions
+set_debug 1
+
+copy_tape_confs
+
+echo "${cwd}/build" >/tmp/file-list
+
+cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
+# sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
+
+change_jobname NightlySave $JobName
+start_test
+
+cat <<END_OF_DATA >tmp/bconcmds
+@output /dev/null
+messages
+@$out tmp/log1.out
+setdebug level=100 storage=DDS-4
+label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+run job=$JobName yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+
+#
+# now drop and recreate the database
+#
+cd bin
+./drop_bacula_tables >/dev/null 2>&1
+./make_bacula_tables >/dev/null 2>&1
+./grant_bacula_privileges 2>&1 >/dev/null
+cd ..
+
+echo "volume=TestVolume001" >tmp/bscan.bsr
+bin/bscan -d200 -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
+
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
+messages
+@$out tmp/log2.out
+@#
+@# now do a restore
+@#
+restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+yes
+wait
+messages
+@$out
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+rm -f ${cwd}/build/src/lib/dummy
+
+check_two_logs
+check_restore_diff
+end_test
TestName="bscan-tape"
JobName=bscantape
. scripts/functions
-set_debug 0
+set_debug 1
copy_tape_confs
set_debug 0
. config.out
-if test x${AUTOCHANGER} = x/dev/null ; then
- echo "two-pool-test skipped. No autochanger."
- exit
-fi
cwd=`pwd`
scripts/cleanup
scripts/copy-2disk-confs
run job=$JobName yes
wait
messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+
+mt -f ${TAPE_DRIVE} rewind
+mtx -f ${AUTOCHANGER} unload
+sleep 15
+
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
+messages
@#
@# now do a restore
@#
TestName="win32-to-linux-tape"
JobName=AutoLabel
. scripts/functions
-set_debug 0
+set_debug 1
scripts/copy-win32-confs
scripts/cleanup-tape
@# now do a restore
@#
@$out tmp/log2.out
-restore where=c:/tmp/bacula-restores client=Tibs select all storage=DDS-4 done
+restore where=/tmp/bacula-restores client=Tibs select all storage=DDS-4 done
yes
wait
messages