this cleans up any files that may be created with root permissions.
+If you want to add more tests, do so by putting the shell script
+in the tests subdirectory. Be careful when adding (or better not)
+new clients, pools, and such to the test-bacula-dir.conf.in file
+as it may invalidate a good number of tests, which respond to
+questions by answering with a number (i.e. the order of the selection
+list is known). It might be better to add your own testb-bacula...
+configuration file.
+
+To avoid re-doing a make setup if you have made a change to the
+conf files, and you do not need a new copy of the source, you can simply do:
+
+ scripts/do-sed <your-email-address>
--- /dev/null
+#
+# TestA Bacula Director Configuration file
+#
+# For Bacula release 1.30 (12 April 2003) -- redhat 7.3
+#
+
+Director { # define myself
+ Name = rufus-dir
+ DIRport = 8101 # where we listen for UA connections
+ QueryFile = "@scriptdir@/query.sql"
+ WorkingDirectory = "@working_dir@"
+ PidDirectory = "@piddir@"
+ SubSysDirectory = "@subsysdir@"
+ Maximum Concurrent Jobs = 1
+ Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password
+ Messages = Standard
+}
+
+
+Job {
+ Name = "MultiVol"
+ Type = Backup
+ Client=rufus-fd
+ Level = Full
+ FileSet="Full Set"
+ Storage = File
+ Messages = Standard
+ Write Bootstrap = "@working_dir@/SmallVols.bsr"
+ Pool = SmallVols
+}
+
+
+Job {
+ Name = "VerifyVolume"
+ Type = Verify
+ Level = VolumeToCatalog
+ Client=rufus-fd
+ FileSet="Full Set"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+}
+
+
+
+# Standard Restore template, to be changed by Console program
+Job {
+ Name = "RestoreFiles"
+ Type = Restore
+ Client=rufus-fd
+ FileSet="Full Set"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Where = /tmp/bacula-restores
+}
+
+
+# List of files to be backed up
+FileSet {
+ Name = "Full Set"
+ Include = signature=SHA1 {
+ </tmp/file-list
+ }
+}
+
+
+# Client (File Services) to backup
+Client {
+ Name = rufus-fd
+ Address = rufus
+ FDPort = 8102
+ Catalog = MyCatalog
+ Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
+ File Retention = 30d # 30 days
+ Job Retention = 180d # six months
+ AutoPrune = yes # Prune expired Jobs/Files
+}
+
+# Definiton of file storage device
+Storage {
+ Name = File
+ Address = rufus # N.B. Use a fully qualified name here
+ SDPort = 8103
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage
+ Media Type = File
+}
+
+Storage {
+ Name = File1
+ Address = rufus # N.B. Use a fully qualified name here
+ SDPort = 8103
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage1
+ Media Type = File1
+}
+
+
+# Generic catalog service
+Catalog {
+ Name = MyCatalog
+ dbname = bacula; user = bacula; password = ""
+}
+
+# Reasonable message delivery -- send most everything to email address
+# and to the console
+Messages {
+ Name = Standard
+ mailcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
+ operatorcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
+ MailOnError = @job_email@ = all
+ operator = @job_email@ = mount
+ console = all, !skipped
+
+ append = "@working_dir@/log" = all, !skipped
+}
+
+Messages {
+ Name = NoEmail
+ mailcommand = "@sbindir@/smtp -h localhost -f \"\(Bacula Regression\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
+ console = all, !skipped
+
+ append = "@working_dir@/log" = all, !skipped
+}
+
+
+# Default pool definition
+Pool {
+ Name = Default
+ Pool Type = Backup
+ Recycle = yes # Bacula can automatically recycle Volumes
+ AutoPrune = yes # Prune expired volumes
+ Volume Retention = 365d # one year
+ Accept Any Volume = yes # write on any volume in the pool
+}
+
+Pool {
+ Name = SmallVols
+ Pool Type = Backup
+ Recycle = yes # Bacula can automatically recycle Volumes
+ AutoPrune = yes # Prune expired volumes
+ Volume Retention = 365d # one year
+ Accept Any Volume = yes # write on any volume in the pool
+ Maximum Volumes = 10
+ MaximumVolumeBytes = 10M
+ LabelFormat = Small
+}
+
--- /dev/null
+#!/bin/sh
+#
+# Create a 60MB file with random bytes. Back it up to 6 Volumes
+# each constrained to 10MB using the automatic labeling feature.
+#
+cwd=`pwd`
+scripts/copy-testa-confs
+rm -rf tmp/SmallVols* tmp/bacula-restores tmp/largefile
+echo "${cwd}/tmp/largefile" >/tmp/file-list
+# Create 56MB file with random data
+echo "Creating a 56MB file with random data ..."
+dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
+echo "largefile created"
+bin/bacula stop 2>&1 >/dev/null
+bin/drop_sqlite_tables
+bin/make_sqlite_tables
+
+echo " "
+echo " "
+echo " === Starting two-vol-test ==="
+echo " "
+
+bin/bacula start
+bin/console -c bin/console.conf <<END_OF_DATA
+messages
+@output
+run job=MultiVol storage=File
+yes
+wait
+messages
+@#
+@# now do a restore
+@#
+restore where=${cwd}/tmp/bacula-restores
+5
+done
+yes
+wait
+messages
+quit
+END_OF_DATA
+bin/bacula stop
+diff -ur tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile
+if [ $? != 0 ] ; then
+ echo " "
+ echo " "
+ echo " ===== six-vol-test Bacula source failed!!! ===== "
+ echo " ===== six-vol-test failed!!! ===== " >>test.out
+ echo " "
+else
+ echo " ===== six-vol-test Bacula source OK ===== "
+ echo " ===== six-vol-test OK ===== " >>test.out
+ rm -rf tmp/bacula-restores tmp/SmallVols* tmp/largefile
+fi