#!/bin/sh
+#
+if test $# != 1 ; then
+ echo "First arg must be email name"
+ exit 1
+fi
out="/tmp/sed_tmp"
cwd=`pwd`
+host=`hostname | tr '.' ' ' | cut -f 1 -d ' '`
+if test x$host = x ; then
+ host=localhost
+fi
# Create sed command script
echo "s%@sbindir@%${cwd}/bin%g" >${out}
echo "s%@scriptdir@%${cwd}/bin%g" >>${out}
echo "s%@subsysdir@%${cwd}/working%g" >>${out}
echo "s%@job_email@%${1}%g" >>${out}
echo "s%@tmpdir@%${cwd}/tmp%g" >>${out}
+echo "s%@hostname@%${host}%g" >>${out}
# process .in files with sed script
sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf
--with-pid-dir=$1/working \
--with-subsys-dir=$1/working \
--enable-smartalloc \
+ --disable-readline \
--with-sqlite=$2 \
--with-working-dir=$1/working \
--with-dump-email=$3 \
#
Director { # define myself
- Name = rufus-dir
+ Name = @hostname@-dir
DIRport = 8101 # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
Job {
Name = "NightlySave"
Type = Backup
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="Full Set"
Storage = File
Messages = Standard
Job {
Name = "MonsterSave"
Type = Backup
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="Full Set"
Storage = File1
Messages = Standard
Name = "VerifyVolume"
Type = Verify
Level = VolumeToCatalog
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="Full Set"
Storage = File
Messages = Standard
Job {
Name = "SparseTest"
Type = Backup
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="SparseSet"
Storage = File
Messages = Standard
Job {
Name = "CompressedTest"
Type = Backup
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="CompressedSet"
Storage = File
Messages = Standard
Job {
Name = "SparseCompressedTest"
Type = Backup
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="SparseCompressedSet"
Storage = File
Messages = Standard
Job {
Name = "BackupCatalog"
Type = Backup
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="Catalog"
# Schedule = "WeeklyCycleAfterBackup"
Storage = File
Job {
Name = "RestoreFiles"
Type = Restore
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="Full Set"
Storage = File
Messages = Standard
# Client (File Services) to backup
Client {
- Name = rufus-fd
- Address = rufus
+ Name = @hostname@-fd
+ Address = @hostname@
FDPort = 8102
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
# Definiton of file storage device
Storage {
Name = File
- Address = rufus # N.B. Use a fully qualified name here
+ Address = @hostname@ # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Storage {
Name = File1
- Address = rufus # N.B. Use a fully qualified name here
+ Address = @hostname@ # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
# Definition of DLT tape storage device
#Storage {
# Name = DLTDrive
-# Address = rufus # N.B. Use a fully qualified name here
+# Address = @hostname@ # N.B. Use a fully qualified name here
# SDPort = 8103
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = "HP DLT 80" # must be same as Device in Storage daemon
# Definition of DDS tape storage device
#Storage {
# Name = SDT-10000
-# Address = rufus # N.B. Use a fully qualified name here
+# Address = @hostname@ # N.B. Use a fully qualified name here
# SDPort = 8103
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon
# Device = SDT-10000 # must be same as Device in Storage daemon
# Definition of 8mm tape storage device
#Storage {
# Name = "8mmDrive"
-# Address = rufus # N.B. Use a fully qualified name here
+# Address = @hostname@ # N.B. Use a fully qualified name here
# SDPort = 8103
# Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
# Device = "Exabyte 8mm"
# List Directors who are permitted to contact this File daemon
#
Director {
- Name = rufus-dir
+ Name = @hostname@-dir
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc"
}
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
- Name = rufus-fd
+ Name = @hostname@-fd
FDport = 8102 # where we listen for the director
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
# Send all messages except skipped files back to Director
Messages {
Name = Standard
- director = rufus-dir = all
+ director = @hostname@-dir = all
}
#
Storage { # definition of myself
- Name = rufus-sd
+ Name = @hostname@-sd
SDPort = 8103 # Director's port
WorkingDirectory = "@working_dir@"
Pid Directory = "@piddir@"
# List Directors who are permitted to contact Storage daemon
#
Director {
- Name = rufus-dir
+ Name = @hostname@-dir
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
}
#
Messages {
Name = Standard
- director = rufus-dir = all
+ director = @hostname@-dir = all
}
#
Director {
- Name = rufus-dir
+ Name = @hostname@-dir
DIRport = 8101
- address = rufus
+ address = @hostname@
Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"
}
#
Director { # define myself
- Name = rufus-dir
+ Name = @hostname@-dir
DIRport = 8101 # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
Job {
Name = "MultiVol"
Type = Backup
- Client=rufus-fd
+ Client=@hostname@-fd
Level = Full
FileSet="Full Set"
Storage = File
Name = "VerifyVolume"
Type = Verify
Level = VolumeToCatalog
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="Full Set"
Storage = File
Messages = Standard
Job {
Name = "RestoreFiles"
Type = Restore
- Client=rufus-fd
+ Client=@hostname@-fd
FileSet="Full Set"
Storage = File
Messages = Standard
# Client (File Services) to backup
Client {
- Name = rufus-fd
- Address = rufus
+ Name = @hostname@-fd
+ Address = @hostname@
FDPort = 8102
Catalog = MyCatalog
Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
# Definiton of file storage device
Storage {
Name = File
- Address = rufus # N.B. Use a fully qualified name here
+ Address = @hostname@ # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage
Storage {
Name = File1
- Address = rufus # N.B. Use a fully qualified name here
+ Address = @hostname@ # N.B. Use a fully qualified name here
SDPort = 8103
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
Device = FileStorage1
MaximumVolumeBytes = 10M
LabelFormat = Small
}
-
echo " "
echo " "
echo " === Starting Backup Bacula Test ==="
-echo " === Starting Backup Bacula Test ===" >>tmp/log
+echo " === Starting Backup Bacula Test ===" >>working/log
echo " "
bin/bacula start
END_OF_DATA
sleep 2
bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
+diff -r build /tmp/bacula-restores${cwd}/build
if [ $? != 0 ] ; then
echo " "
echo " "
echo " "
echo " "
echo " === Starting compressed-test ==="
-echo " === Starting compressed-test ===" >>tmp/log
+echo " === Starting compressed-test ===" >>working/log
echo " "
bin/bacula start
quit
END_OF_DATA
bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
+diff -r build /tmp/bacula-restores${cwd}/build
if [ $? != 0 ] ; then
echo " "
echo " "
echo " "
echo " "
echo " === Starting two-vol-test ==="
-echo " === Starting two-vol-test ===" >>tmp/log
+echo " === Starting two-vol-test ===" >>working/log
echo " "
bin/bacula start
quit
END_OF_DATA
bin/bacula stop
-diff -ur tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile
+diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile
if [ $? != 0 ] ; then
echo " "
echo " "
echo " "
echo " "
echo " === Starting sparse-compressed-test ==="
-echo " === Starting sparse-compressed-test ===" >>tmp/log
+echo " === Starting sparse-compressed-test ===" >>working/log
echo " "
bin/bacula start
END_OF_DATA
bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
+diff -r build /tmp/bacula-restores${cwd}/build
if [ $? != 0 ] ; then
echo " "
echo " "
echo " "
echo " "
echo " === Starting sparse-test ==="
-echo " === Starting sparse-test ===" >>tmp/log
+echo " === Starting sparse-test ===" >>working/log
echo " "
bin/bacula start
quit
END_OF_DATA
bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
+diff -r build /tmp/bacula-restores${cwd}/build
if [ $? != 0 ] ; then
echo " "
echo " "
echo " "
echo " "
echo " === Starting two-jobs-test ==="
-echo " === Starting two-jobs-test ===" >>tmp/log
+echo " === Starting two-jobs-test ===" >>working/log
echo " "
bin/bacula start
quit
END_OF_DATA
bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
+diff -r build /tmp/bacula-restores${cwd}/build
if [ $? != 0 ] ; then
echo " "
echo " "
echo " "
echo " "
echo " === Starting two-vol-test ==="
-echo " === Starting two-vol-test ===" >tmp/log
+echo " === Starting two-vol-test ===" >working/log
echo " "
bin/bacula start
quit
END_OF_DATA
bin/bacula stop
-diff -ur build tmp/bacula-restores${cwd}/build
+diff -r build tmp/bacula-restores${cwd}/build
if [ $? != 0 ] ; then
echo " "
echo " "
echo " "
echo " "
echo " === Starting verify Volume Test ==="
-echo " === Starting verify Volume Test ===" >>tmp/log
+echo " === Starting verify Volume Test ===" >>working/log
echo " "
bin/bacula start