Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = DDS-4 # must be same as Device in Storage daemon
Media Type = DDS-4 # must be same as MediaType in Storage daemon
- AutoChanger = yes
Maximum Concurrent Jobs = 4
}
Volume Retention = 365d # one year
Accept Any Volume = yes # write on any volume in the pool
}
-
#
Director { # define myself
- Name = roxie-dir
+ Name = rufus-dir
DIRport = 8101 # where we listen for UA connections
QueryFile = "/home/kern/bacula/regress/bin/query.sql"
WorkingDirectory = "/home/kern/bacula/regress/working"
if ! test x@autochanger@ = x/dev/null; then
drive=`bin/mtx-changer @autochanger@ loaded`
if ! test x$drive = x2; then
- bin/mtx-changer @autochanger@ unload
- bin/mtx-changer @autochanger@ load 2
+ bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
+ bin/mtx-changer @autochanger@ load 2 @tape_drive@ 0
fi
mt -f @tape_drive@ rewind
mt -f @tape_drive@ weof
if ! test x@autochanger@ = x/dev/null; then
drive=`bin/mtx-changer @autochanger@ loaded`
if ! test x$drive = x1; then
- bin/mtx-changer @autochanger@ unload
- bin/mtx-changer @autochanger@ load 1
+ bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
+ bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
fi
fi
# to a tape then restore it, we do that twice to ensure that
# we can correctly append to a tape.
#
-cwd=`pwd`
debug=0
if test "$debug" -eq 1 ; then
out="tee"
else
out="output"
fi
+
+cwd=`pwd`
scripts/copy-tape-confs
scripts/cleanup-tape
# Run a simple backup of the Bacula build directory
# then restore it.
#
+debug=0
+if test "$debug" -eq 1 ; then
+ out="tee"
+else
+ out="output"
+fi
+
cwd=`pwd`
scripts/copy-confs
scripts/cleanup
echo " === Starting Backup Bacula Test at `date +%R:%S` ===" >>working/log
echo " "
-bin/bacula start 2>&1 >/dev/null
-#bin/bacula start
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-#bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
label volume=TestVolume001
run job=Client1 yes
status storage=File
@#
@# now do a restore
@#
-@output tmp/log2.out
+@$out tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
messages
-@output
+@$out
quit
END_OF_DATA
+
+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
+
scripts/check_for_zombie_jobs storage=File
bin/bacula stop 2>&1 >/dev/null
grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
# do a bscan and restore.
# It should require at least 4 different bsrs.
#
+debug=0
+if test "$debug" -eq 1 ; then
+ out="tee"
+else
+ out="output"
+fi
+
cwd=`pwd`
scripts/copy-tape-confs
scripts/cleanup-tape
echo " === Starting bscan-tape at `date +%R:%S` ===" >>working/log
echo " "
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
estimate job=NightlySave listing
estimate job=NightlySave listing
estimate job=NightlySave listing
messages
-@output tmp/log1.out
+@$out tmp/log1.out
setdebug level=2 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=NightlySave yes
messages
quit
END_OF_DATA
+
+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
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 1 done"
# make some files for the incremental to pick up
#
# run a second job
#
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
run job=NightlySave level=Incremental yes
wait
messages
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 2 done"
touch ${cwd}/build/src/dird/*.c
#
# run a third job
#
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
run job=NightlySave level=Incremental yes
wait
messages
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 3 done"
# make some files for the incremental to pick up
#
# run a fourth job
#
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null 2>&1 >/dev/null
-@output /dev/null
+
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
run job=NightlySave level=Incremental yes
wait
messages
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 4 done"
#
bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null
bin/bacula start 2>&1 >/dev/null
bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+@$out /dev/null
messages
-@output tmp/log2.out
+@$out tmp/log2.out
@#
@# now do a restore
@#
yes
wait
messages
-@output
+@$out
quit
END_OF_DATA
scripts/check_for_zombie_jobs storage=DDS-4
echo " "
bin/bacula start 2>&1 >/dev/null
-#bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@tee /dev/null
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
+# bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+@output /dev/null
messages
-@tee tmp/log1.out
+@output tmp/log1.out
label storage=File1 volume=TestVolume001
label storage=File1 volume=TestVolume002
update Volume=TestVolume001 MaxVolBytes=3000000
@#
@# now do a restore
@#
-@tee tmp/log2.out
+@output tmp/log2.out
restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select storage=File1
unmark *
cd ${cwd}/build/src/cats
yes
wait
messages
-@tee
+@output
quit
END_OF_DATA
scripts/check_for_zombie_jobs storage=File1
# to a tape where we set the minimum and maximum block
# sizes.
#
+debug=0
+if test "$debug" -eq 1 ; then
+ out="tee"
+else
+ out="output"
+fi
cwd=`pwd`
scripts/copy-tape-confs
scripts/cleanup-tape
echo " === Starting Fixed Block Size test at `date +%R:%S` ===" >>working/log
echo " "
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=NightlySave yes
wait
@#
@# now do a restore
@#
-@output tmp/log2.out
+@$out tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
yes
wait
messages
-@output
+@$out
quit
END_OF_DATA
+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
scripts/check_for_zombie_jobs storage=DDS-4
bin/bacula stop 2>&1 >/dev/null
#
# Run two jobs at the same time
#
+debug=0
+if test "$debug" -eq 1 ; then
+ out="tee"
+else
+ out="output"
+fi
+
cwd=`pwd`
scripts/copy-tape-confs
scripts/cleanup-tape
echo " === Starting four-concurrent-jobs-tape at `date +%R:%S` ===" >>working/log
echo " "
-bin/bacula start 2>&1 >/dev/null
-#bin/bacula start
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-#bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=NightlySave level=Full Storage=DDS-4 yes
run job=NightlySave level=Full Storage=DDS-4 yes
@#
@# now do a restore
@#
-@output tmp/log2.out
+@$out tmp/log2.out
restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
unmark *
mark *
yes
wait
messages
-@output
+@$out
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
bin/bacula stop 2>&1 >/dev/null
grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
# then backup four times, each with incremental then finally restore.
# It should require at least 4 different bsrs.
#
+debug=0
+if test "$debug" -eq 1 ; then
+ out="tee"
+else
+ out="output"
+fi
cwd=`pwd`
-
scripts/copy-tape-confs
scripts/cleanup-tape
echo "${cwd}/build" >/tmp/file-list
echo " === Starting four-jobs-tape at `date +%R:%S` ===" >>working/log
echo " "
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
estimate job=NightlySave listing
estimate job=NightlySave listing
estimate job=NightlySave listing
messages
-@output tmp/log1.out
+@$out tmp/log1.out
label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
run job=NightlySave yes
wait
messages
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 1 done"
# make some files for the incremental to pick up
#
# run a second job
#
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
run job=NightlySave level=Incremental yes
wait
messages
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 2 done"
touch ${cwd}/build/src/dird/*.c
#
# run a third job
#
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
run job=NightlySave level=Incremental yes
wait
messages
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 3 done"
# make some files for the incremental to pick up
#
# run a fourth job
#
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
messages
-@output tmp/log1.out
+@$out tmp/log1.out
run job=NightlySave level=Incremental yes
wait
messages
quit
END_OF_DATA
+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
+
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 4 done"
#
# now do several restores to ensure we cleanup between jobs
#
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
restore where=${cwd}/tmp/bacula-restores select all done
yes
wait
-@output tmp/log2.out
+@$out tmp/log2.out
@#
@# now unmount the tape and start two restores
@# at the same time
mount storage=DDS-4
wait
messages
-@output
+@$out
quit
END_OF_DATA
+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
+
bin/bacula stop 2>&1 >/dev/null
grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
bstat=$?