build
bin
test.out
-wierd-files
+weird-files
diff
tmp
working
tests/sparse-test
tests/compressed-test
tests/sparse-compressed-test
-tests/wierd-files-test
+tests/weird-files-test
tests/two-jobs-test
tests/two-vol-test
tests/six-vol-test
tests/bscan-test
-tests/wierd-files2-test
+tests/weird-files2-test
tests/concurrent-jobs-test
tests/four-concurrent-jobs-test
tests/bsr-opt-test
tests/sparse-test
tests/compressed-test
tests/sparse-compressed-test
-tests/wierd-files-test
+tests/weird-files-test
tests/two-jobs-test
tests/two-vol-test
tests/six-vol-test
tests/bscan-test
-tests/wierd-files2-test
+tests/weird-files2-test
tests/concurrent-jobs-test
tests/four-concurrent-jobs-test
tests/bsr-opt-test
--- /dev/null
+#
+# Default Bacula Storage Daemon Configuration file
+#
+# For Bacula release 1.32 (20 Sep 2003) -- redhat 9
+#
+# You may need to change the name of your tape drive
+# on the "Archive Device" directive in the Device
+# resource. If you change the Name and/or the
+# "Media Type" in the Device resource, please ensure
+# that dird.conf has corresponding changes.
+#
+
+Storage { # definition of myself
+ Name = rufus-sd
+ SDPort = 8103 # Director's port
+ WorkingDirectory = "/home/kern/bacula/regress/working"
+ Pid Directory = "/home/kern/bacula/regress/working"
+}
+
+#
+# List Directors who are permitted to contact Storage daemon
+#
+Director {
+ Name = rufus-dir
+ Password = "BzlEl8haeFmnv/Lv8V6zDzUBgFFQNsUtny6VkmccQpOy"
+}
+
+#
+# Devices supported by this Storage daemon
+# To connect, the Director's bacula-dir.conf must have the
+# same Name and MediaType.
+#
+
+Device {
+ Name = FileStorage
+ Media Type = File
+ Archive Device = @tmpdir@
+ LabelMedia = yes; # lets Bacula label unlabeled media
+ Random Access = Yes;
+ AutomaticMount = yes; # when device opened, read it
+ RemovableMedia = no;
+ AlwaysOpen = no;
+}
+
+#Device {
+# Name = DDS-4 #
+# Media Type = DDS-4
+# Archive Device = /dev/nst0
+# AutomaticMount = yes; # when device opened, read it
+# AlwaysOpen = yes;
+# RemovableMedia = yes;
+#}
+
+#
+# A very old Exabyte with no end of media detection
+#
+#Device {
+# Name = "Exabyte 8mm"
+# Media Type = "8mm"
+# Archive Device = /dev/nst0
+# Hardware end of medium = No;
+# AutomaticMount = yes; # when device opened, read it
+# AlwaysOpen = Yes;
+# RemovableMedia = yes;
+#}
+
+#
+# Send all messages to the Director,
+# mount messages also are sent to the email address
+#
+Messages {
+ Name = Standard
+ director = rufus-dir = all
+}
echo " === /dev save/restore test ==="
echo " "
echo " "
+UID=`/usr/bin/id -g`
if [ $UID != 0 ] ; then
echo " "
echo "You must be root to run this test."
echo " === /etc save/restore test ==="
echo " "
echo " "
+UID=`/usr/bin/id -g`
if [ $UID != 0 ] ; then
echo " "
echo "You must be root to run this test."
echo " === /lib save/restore test ==="
echo " "
echo " "
+UID=`/usr/bin/id -g`
if [ $UID != 0 ] ; then
echo " "
echo "You must be root to run this test."
--- /dev/null
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory
+# then restore it.
+#
+if test ! -d weird-files ; then
+ echo " "
+ echo "Weird files not configured. Test not run."
+ exit 0
+fi
+cwd=`pwd`
+scripts/copy-test-confs
+scripts/cleanup
+echo "${cwd}/weird-files" >/tmp/file-list
+bin/bacula stop 2>&1 >/dev/null
+bin/drop_sqlite_tables
+bin/make_sqlite_tables
+
+echo " "
+echo " "
+echo " === Starting weird filenames test ==="
+echo " === Starting weird filenames test ===" >>working/log
+echo " "
+
+bin/bacula start 2>&1 >/dev/null
+bin/console -c bin/console.conf <<END_OF_DATA
+@output /dev/null
+messages
+@output tmp/log1.out
+label storage=File
+TestVolume001
+run job=NightlySave
+yes
+wait
+messages
+@#
+@# now do a restore
+@#
+@output tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores current all
+yes
+wait
+messages
+@output
+quit
+END_OF_DATA
+bin/bacula stop 2>&1 >/dev/null
+${cwd}/bin/testls weird-files >${cwd}/tmp/original
+cd tmp/bacula-restores${cwd}
+${cwd}/bin/testls weird-files >${cwd}/tmp/restored
+cd ${cwd}
+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 ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
+ echo " "
+ echo " "
+ echo " !!!!! Weird files test failed!!! !!!!! "
+ echo " !!!!! Weird files test failed!!! !!!!! " >>test.out
+ echo " "
+else
+ echo " ===== Weird files test OK ===== "
+ echo " ===== Weird files test OK ===== " >>test.out
+ cd ${cwd}
+ scripts/cleanup
+fi
--- /dev/null
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory
+# then restore it.
+#
+if test ! -d weird-files ; then
+ echo " "
+ echo "weird files not configured. Test not run."
+ exit 0
+fi
+cwd=`pwd`
+scripts/copy-test-confs
+scripts/cleanup
+rm -rf weird-files2
+cp -a weird-files weird-files2
+echo "${cwd}/weird-files2" >/tmp/file-list
+bin/bacula stop 2>&1 >/dev/null
+bin/drop_sqlite_tables
+bin/make_sqlite_tables
+
+echo " "
+echo " "
+echo " === Starting weird filenames2 test ==="
+echo " === Starting weird filenames2 test ===" >>working/log
+echo " "
+
+bin/testls weird-files2 >${cwd}/tmp/original
+bin/bacula start 2>&1 >/dev/null
+bin/console -c bin/console.conf <<END_OF_DATA
+@output /dev/null
+messages
+@output tmp/log1.out
+label storage=File volume=TestVolume001
+run job=NightlySave yes
+wait
+messages
+@output
+quit
+END_OF_DATA
+#
+# Now mess up the a hard link, and a soft link
+#
+cd weird-files2
+rm -f hard-file2
+ln hard-file3 hard-file2
+rm -f soft-file2
+ln -s soft-file3 soft-file2
+cd ${cwd}
+bin/console -c bin/console.conf <<END_OF_DATA
+@output /dev/null
+messages
+@#
+@# now do a restore
+@#
+@output tmp/log2.out
+restore where=
+5
+done
+yes
+wait
+messages
+@output
+quit
+END_OF_DATA
+bin/bacula stop 2>&1 >/dev/null
+bin/testls weird-files2 >${cwd}/tmp/restored
+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 ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
+ echo " "
+ echo " "
+ echo " !!!!! Weird files2 test failed!!! !!!!! "
+ echo " !!!!! Weird files2 test failed!!! !!!!! " >>test.out
+ echo " "
+else
+ echo " ===== Weird files2 test OK ===== "
+ echo " ===== Weird files2 test OK ===== " >>test.out
+ cd ${cwd}
+ scripts/cleanup
+ rm -rf weird-files2
+fi