nice tests/2drive-incremental-2disk
nice tests/scratch-pool-test
nice tests/2drive-concurrent-test
+nice tests/incremental-2media
+nice tests/three-pool-test
echo " "
echo "Test results"
cat test.out
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
Device = DiskChanger # must be same as Device in Storage daemon
- Media Type = DiskChanger # must be same as MediaType in Storage daemon
+ Media Type = DiskChangerMedia # must be same as MediaType in Storage daemon
Maximum Concurrent Jobs = 4
Autochanger = yes
}
}
+# Definition of File storage device
+Storage {
+ Name = File
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = 8103
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
+ Device = FileStorage # must be same as Device in Storage daemon
+ Media Type = FileMedia # must be same as MediaType in Storage daemon
+ Maximum Concurrent Jobs = 4
+}
+
+
+
# Generic catalog service
Catalog {
Name = MyCatalog
# Maximum File Size = 1000000
}
+Device {
+ Name = FileStorage
+ Media Type = FileMedia
+ Archive Device = @tmpdir@
+ LabelMedia = yes; # lets Bacula label unlabeled media
+ Random Access = Yes;
+ AutomaticMount = yes; # when device opened, read it
+ RemovableMedia = no;
+ AlwaysOpen = no;
+}
+
#
# Send all messages to the Director,
Device {
Name = Drive-0 #
Device Type = File
- Media Type = DiskChanger
+ Media Type = DiskChangerMedia
Archive Device = @disk_drive@/drive0
AutomaticMount = yes; # when device opened, read it
Autochanger = yes
if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
echo " "
echo " "
- echo " !!!!! $TestName Bacula source failed!!! !!!!! "
+ echo " !!!!! $TestName failed!!! !!!!! "
echo " !!!!! $TestName failed!!! !!!!! " >>test.out
if [ $bstat != 0 -o $rstat != 0 ] ; then
echo " !!!!! Bad Job termination status !!!!! "
fi
echo " "
else
- echo " ===== $TestName Bacula source OK `date +%R:%S` ===== "
+ echo " ===== $TestName OK `date +%R:%S` ===== "
echo " ===== $TestName OK `date +%R:%S` ===== " >>test.out
if test "$debug" -eq 0 ; then
scripts/cleanup
--- /dev/null
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory then create some
+# new files, do an Incremental onto a different medium
+# and then restore everything.
+#
+# This script uses the virtual disk autochanger
+#
+TestName="incremental-2media"
+JobName=Inc2media
+. scripts/functions
+
+. config.out
+
+scripts/cleanup
+scripts/copy-2disk-confs
+scripts/prepare-two-disks
+echo "${cwd}/build" >/tmp/file-list
+
+change_jobname $JobName
+start_test
+
+# Write out bconsole commands
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
+messages
+@$out tmp/log1.out
+label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
+label storage=File volume=TestVolume002 Pool=Default
+run job=$JobName yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+
+echo "Backup 1 done"
+# make some files for the incremental to pick up
+touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
+touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
+
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
+messages
+@$out tmp/log1.out
+@# Force Incremental on the second Volume
+update volume=TestVolume001 VolStatus=Used
+setdebug level=51 storage=File
+run level=Incremental job=$JobName storage=File yes
+wait
+messages
+@#
+@# now do a restore
+@#
+@$out tmp/log2.out
+setdebug level=51 storage=DDS-4
+restore where=${cwd}/tmp/bacula-restores select all done
+yes
+wait
+messages
+@$out
+quit
+END_OF_DATA
+
+run_bconsole
+
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+
+end_test
list volumes
@#setdebug level=100 dir
@# should migrate two jobs
+setdebug level=51 storage=DiskChanger
run job=migrate-job yes
wait
messages
@# now do a restore
@#
@$out tmp/log2.out
+list volumes
restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
unmark *
mark *
@output /dev/null
messages
@$out tmp/log1.out
-@#setdebug level=150 storage=DDS-4
+setdebug level=51 storage=DDS-4
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Full drive=0
label storage=DDS-4 volume=TestVolume003 slot=3 Pool=Inc drive=1
END_OF_DATA
run_bconsole
+
check_for_zombie_jobs storage=DDS-4
stop_bacula
+
check_two_logs
-check_restore_tmp_build_diff
+check_restore_diff
end_test