--- /dev/null
+#
+# Makefile for Bacula regression testing
+#
+# Before running, you must create a file named config containing
+# the configuration parameters. Create it by doing:
+#
+# cp prototype.conf config
+#
+# Then edit config and set the value for what are appropriate for you.
+#
+
+first_rule: all
+
+all:
+
+setup: bacula sed
+
+#
+# Some machines cannot handle the sticky bit and other garbage that
+# is in weird-files, so we load and run it only on Linux machines.
+#
+bacula: all
+ @rm -rf bin build weird-files tmp
+ @rm -f w.tar.gz w.tar
+ @cp weird-files.tar.gz w.tar.gz
+ @-gunzip w.tar.gz
+ @-tar xf w.tar
+ @rm -f w.tar.gz w.tar
+ @rm -rf tmp working
+ mkdir tmp working
+ echo "Doing: scripts/setup"
+ scripts/setup
+
+sed:
+ echo "Doing: scripts/do_sed"
+ scripts/do_sed
+
+# Run all non-root userid tests
+test:
+ ./all-non-root-tests
+
+# run all file and tape tests
+full_test:
+ ./all-tape-and-file-tests
+
+# These tests require you to run as root
+root_test:
+ ./all-root-tests
+
+clean:
+ scripts/cleanup
+ rm -f /tmp/file-list
+ rm -fr tmp/* working/*
+ rm -f test.out
+ rm -f diff
+ rm -f 1 2 3 scripts/1 scripts/2 scripts/3 tests/1 tests/2 tests/3
+ find . -name .#* -exec rm -rf {} \;
+
+# Reset our userid after running as root
+reset:
+ chown -R ${USER}:${USER} . tmp working
+ scripts/cleanup
+ rm -f /tmp/file-list tmp/file-list
+ rm -f tmp/* working/*
+
+distclean: clean
+ rm -rf bin build weird-files weird-files weird-files2 tmp working
+ rm -f scripts/*.conf
+
+++ /dev/null
-#
-# Makefile for Bacula regression testing
-#
-# Note, Makefile is built from Makefile.in, which you should not really
-# need to change, by envoking:
-#
-# ./config <user's configuration>
-# e.g.
-#
-# ./config kern.conf
-#
-#
-
-# suck in user's configuration
-@CONFIG@
-
-first_rule: all
-
-all:
-
-setup: bacula sed
-
-#
-# Some machines cannot handle the sticky bit and other garbage that
-# is in weird-files, so we load and run it only on Linux machines.
-#
-bacula: all
- @rm -rf bin build weird-files tmp
- @rm -f w.tar.gz w.tar
- @cp weird-files.tar.gz w.tar.gz
- @-gunzip w.tar.gz
- @-tar xf w.tar
- @rm -f w.tar.gz w.tar
- @rm -rf tmp working
- mkdir tmp working
- echo "Doing: scripts/setup ${BACULA_SOURCE} ${EMAIL} ${WHICHDB} ${TCPWRAPPERS} ${OPENSSL}"
- scripts/setup ${BACULA_SOURCE} ${EMAIL} ${WHICHDB} ${TCPWRAPPERS} ${SMTP_HOST} ${OPENSSL}
-
-sed:
- echo "Doing: scripts/do_sed ${EMAIL} ${TAPE_DRIVE} ${AUTOCHANGER} ${AUTOCHANGER_PATH} ${TAPE_DRIVE1} ${SMTP_HOST}"
- scripts/do_sed ${EMAIL} ${TAPE_DRIVE} ${AUTOCHANGER} ${AUTOCHANGER_PATH} ${TAPE_DRIVE1} ${SMTP_HOST}
-
-# Run all non-root userid tests
-test:
- ./all-non-root-tests
-
-# run all file and tape tests
-full_test:
- ./all-tape-and-file-tests
-
-# These tests require you to run as root
-root_test:
- ./all-root-tests
-
-clean:
- scripts/cleanup
- rm -f /tmp/file-list
- rm -fr tmp/* working/*
- rm -f test.out
- rm -f diff
- rm -f 1 2 3 scripts/1 scripts/2 scripts/3 tests/1 tests/2 tests/3
- find . -name .#* -exec rm -rf {} \;
-
-# Reset our userid after running as root
-reset:
- chown -R ${USER}:${USER} . tmp working
- scripts/cleanup
- rm -f /tmp/file-list tmp/file-list
- rm -f tmp/* working/*
-
-distclean: clean
- rm -rf bin build weird-files weird-files weird-files2 tmp working
- rm -f scripts/*.conf
-
To set it up, create your personal configuration file, by
-copying prototype.conf to xxx.conf or simply editing prototype.conf
-directly.
+copying prototype.conf to config or simply editing prototype.conf
+directly then copying it to the file config.
-Then edit your conf file and define appropriate values
-for the variables that are in that file. If you want to see
-a real example, look at kern.conf, but please don't use my
-email address!
+You must end up with a file named config in the main regress
+directory that has all the specifications that correspond to
+your system.
If you are using SQLite, make sure that depkgs is pre-built if it
isn't already: (cd your-depkgs; make sqlite).
Then do:
- ./config xxx.conf
make setup
You run the above one time. This will build a Makefile from
Hey guys, I've made a bit of progress on the win32 regression scripts.
In order to use the win32 bacula regression scripts, it is important to have
-some unix tools (mainly sed). To make things simple, I downloaded UnxUtils
-from http://sourceforge.net/projects/unxutils
+some unix tools (such as sed, grep, and diff). To make things simple, I
+downloaded UnxUtils from http://sourceforge.net/projects/unxutils
-Extract this somewhere on your hdd ( I extracted to C:\unxutils ) and add
-the usr\local\wbin path from wherever you extracted the utils ( for me it
-was C:\unxutils\usr\local\wbin ) to your {$PATH} on your windows box. If you
-also want to make use of the shell (from unxutils) you may want to add the
-./bin directory as well (or just copy the sh.exe file to usr\local\wbin).
+Extract this somewhere on your hdd and add the the files in usr\local\wbin to
+c:\regress\tools and then add c:\regress\tools to your {$PATH} on your windows
+box. If you also want to make use of the shell (from unxutils) you may want
+to add the ./bin directory as well (or just copy the sh.exe file to
+usr\local\wbin).
Now that you have a working toolset (with sed) we can continue setting up
regression tools. Compile the Ming32 version of bacula (from linux) and then
binaries from the bacula sources and create a local bacula testing platform.
-----------
-At this point all three of the bacula daemons fail miserably mentioning
-something about bacula.dll. I will try figuring out what else is wrong
-because when I installed the same build of bacula with the installer the
-system ran fine. I'm guessing there are some outdated test configurations
-and filenames causing bacula to go on the fritz.
+After the "make setup" all the configuration files are blank, so you must
+fix that before running the scripts.
+
+With the above, most of the regressions scripts seem to function flawlessly.
+
+[KES] The ones that fail have probably been modified on the Unix side
+ after the port was done, so they may need some minor updates.
+++ /dev/null
-#/bin/sh
-#
-# First argument is expected to be a user's configuration file
-#
-if ! test -f $1 ; then
- echo "Arg1 must specify a config file (e.g. prototype.conf)"
- exit 1
-fi
-sed -e "/@CONFIG@/r $1" -e "s/@CONFIG@//" Makefile.in >Makefile
-#!/usr/bin/python
+#!/usr/bin/env python
from time import time as now
t = now()
# Bacula configuration options here, such as --disable-batch-insert
#
OPENSSL="--with-openssl"
+
+# You may put your real host name here, but localhost is valid also
+# and it has the advantage that it works on a non-newtworked machine
+HOST="localhost"
Name = "DefaultRestore"
Type = Restore
Storage = File
- Client=localhost-fd
+ Client=@hostname@-fd
FileSet="FS_TESTJOB"
Messages = Standard
Pool = Default
#!/bin/sh
#
-if test $# != 6 ; then
- echo "First arg must be email name"
- echo " and the second must be a tape drive"
- echo " and the third must be a tape control name or /dev/null"
- echo " and the fourth must be the full path to the mtx program"
- echo " and the fifth must be tape drive 1 or /dev/null"
- echo " and the sixth must be the smtp or email host"
- exit 1
-fi
cwd=`pwd`
+. ${cwd}/config
mkdir -p ${cwd}/bin
out="/tmp/sed_tmp"
-HOST="localhost"
# Create sed command script
echo "s%@sbindir@%${cwd}/bin%g" >${out}
echo "s%@scriptdir@%${cwd}/bin%g" >>${out}
echo "s%@working_dir@%${cwd}/working%g" >>${out}
echo "s%@piddir@%${cwd}/working%g" >>${out}
echo "s%@subsysdir@%${cwd}/working%g" >>${out}
-echo "s%@job_email@%${1}%g" >>${out}
-echo "s%@tape_drive@%${2}%g" >>${out}
-echo "s%@autochanger@%${3}%g" >>${out}
+echo "s%@job_email@%${EMAIL}%g" >>${out}
+echo "s%@tape_drive@%${TAPE_DRIVE}%g" >>${out}
+echo "s%@autochanger@%${AUTOCHANGER}%g" >>${out}
echo "s%@tmpdir@%${cwd}/tmp%g" >>${out}
echo "s%@hostname@%${HOST}%g" >>${out}
-echo "s%@changer_path@%${4}%g" >>${out}
-echo "s%@tape_drive1@%${5}%g" >>${out}
-echo "s%@smtp_host@%${6}%g" >>${out}
+echo "s%@changer_path@%${AUTOCHANGER_PATH}%g" >>${out}
+echo "s%@tape_drive1@%${TAPE_DRIVE1}%g" >>${out}
+echo "s%@smtp_host@%${SMTP_HOST}%g" >>${out}
echo "s%@disk_drive@%${cwd}/tmp/disk-changer%g" >>${out}
-
-echo "# " >config.out
-echo "# Autochanger conf" >>config.out
-echo "# " >>config.out
-echo "AUTOCHANGER=\"${3}\"" >>config.out
-echo "TAPE_DRIVE1=\"${5}\"" >>config.out
-
+echo "s%@hostname@%${hostname}%g" >>${out}
+echo "s%@hostname1@%${hostname1}%g" >>${out}
+echo "s%@hostname2@%${hostname2}%g" >>${out}
+echo "s%@hostname3@%${hostname3}%g" >>${out}
+echo "s%@hostname1_files@%${hostname1_files}%g" >>${out}
+echo "s%@hostname_files@%${hostname_files}%g" >>${out}
+echo "s%@hostname2_files@%${hostname2_files}%g" >>${out}
+echo "s%@hostname3_files@%${hostname3_files}%g" >>${out}
+echo "s%@hostname1_password@%${hostname1_password}%g" >>${out}
+echo "s%@hostname2_password@%${hostname2_password}%g" >>${out}
+echo "s%@hostname3_password@%${hostname3_password}%g" >>${out}
# process .in files with sed script
sed -f ${out} ${cwd}/scripts/bacula-dir.conf.errors.in >${cwd}/scripts/bacula-dir.conf.errors
sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf
+sed -f ${out} ${cwd}/scripts/multi-client-bacula-dir.conf.in >${cwd}/scripts/multi-client-bacula-dir.conf
sed -f ${out} ${cwd}/scripts/bacula-dir.conf.regexwhere.in >${cwd}/scripts/bacula-dir.conf.regexwhere
sed -f ${out} ${cwd}/scripts/bacula-dir.conf.maxtime.in >${cwd}/scripts/bacula-dir.conf.maxtime
sed -f ${out} ${cwd}/scripts/new-test-bacula-dir.conf.in >${cwd}/scripts/new-test-bacula-dir.conf
chmod 777 ${cwd}/scripts/cleanup-*tape ${cwd}/scripts/cleanup-*drive ${cwd}/scripts/prepare-two-tapes
rm -f /tmp/bac$$
cp ${cwd}/bin/mtx-changer /tmp/bac$$
-sed "s%^MTX.*$%MTX=${4}%g" /tmp/bac$$ >${cwd}/bin/mtx-changer
+sed "s%^MTX.*$%MTX=${AUTOCHANGER_PATH}%g" /tmp/bac$$ >${cwd}/bin/mtx-changer
chmod 777 ${cwd}/bin/mtx-changer
# get proper SD tape definitions
/build/platforms/Makefile.in
/build/platforms/redhat/Makefile.in
/build/scripts/Makefile.in
-/build/src/win32/filed/winservice.cpp
+/build/src/win32/filed/service.cpp
/build/src/filed/restore.c
/build/autoconf/configure.in
/build/examples/afs-bacula
set_debug 0
fi
-# Source the second drive variables
-touch ${cwd}/config.out
-. ${cwd}/config.out
+# Source the configuration variables
+. ${cwd}/config
--- /dev/null
+#
+# Default Bacula Director Configuration file
+#
+# The only thing that MUST be changed is to add one or more
+# file or directory names in the Include directive of the
+# FileSet resource.
+#
+# For Bacula release 2.2.2
+#
+# You might also want to change the default email address
+# from root to your address. See the "mail" and "operator"
+# directives in the Messages resource.
+#
+
+Director { # define myself
+ Name = @hostname@-dir
+ DIRport = 8101 # where we listen for UA connections
+ QueryFile = "@scriptdir@/query.sql"
+ WorkingDirectory = "@working_dir@"
+ PidDirectory = "@piddir@"
+ SubSysDirectory = "@subsysdir@"
+ Maximum Concurrent Jobs = 10
+ Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password
+ Messages = Daemon
+}
+
+#
+# Define the main nightly save backup job
+# By default, this job will back up to disk in /tmp
+Job {
+ Name = "NightlySave"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="Full Set"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+ Maximum Concurrent Jobs = 10
+}
+
+Job {
+ Name = @hostname1@
+ Type = Backup
+ Client = @hostname1@-fd
+ FileSet = "@hostname1@-FileSet"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+ Maximum Concurrent Jobs = 10
+}
+
+Job {
+ Name = @hostname2@
+ Type = Backup
+ Client = @hostname2@-fd
+ FileSet = "@hostname2@-FileSet"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+ Maximum Concurrent Jobs = 10
+}
+
+Job {
+ Name = @hostname3@
+ Type = Backup
+ Client = @hostname3@-fd
+ FileSet = "@hostname3@-FileSet"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+ Maximum Concurrent Jobs = 10
+}
+
+
+
+Job {
+ Name = "MonsterSave"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="Full Set"
+ Storage = File1
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+}
+
+
+Job {
+ Name = "VerifyVolume"
+ Type = Verify
+ Level = VolumeToCatalog
+ Client=@hostname@-fd
+ FileSet="Full Set"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+}
+
+
+Job {
+ Name = "SparseTest"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="SparseSet"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+}
+
+Job {
+ Name = "CompressedTest"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="CompressedSet"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Maximum Concurrent Jobs = 10
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+# Max Run Time = 15 seconds
+}
+
+Job {
+ Name = "SparseCompressedTest"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="SparseCompressedSet"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+}
+
+
+# Backup the catalog database (after the nightly save)
+Job {
+ Name = "BackupCatalog"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="Catalog"
+# Schedule = "WeeklyCycleAfterBackup"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ # This creates an ASCII copy of the catalog
+ RunBeforeJob = "@sbindir@/make_catalog_backup -u regress"
+ # This deletes the copy of the catalog
+ RunAfterJob = "@sbindir@/delete_catalog_backup"
+ Write Bootstrap = "@working_dir@/BackupCatalog.bsr"
+}
+
+# Standard Restore template, to be changed by Console program
+Job {
+ Name = "RestoreFiles"
+ Type = Restore
+ Client=@hostname@-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 { Options { signature=MD5 }
+ File = @hostname_files@
+ }
+}
+
+FileSet {
+ Name = "@hostname1@-FileSet"
+ Include { Options { signature=MD5 }
+ File = @hostname1_files@
+ }
+}
+
+FileSet {
+ Name = "@hostname2@-FileSet"
+ Include { Options { signature=MD5 }
+ File = @hostname2_files@
+ }
+}
+
+FileSet {
+ Name = "@hostname3@-FileSet"
+ Include { Options { signature=MD5 }
+ File = @hostname3_files@
+ }
+}
+
+FileSet {
+ Name = "SparseSet"
+ Include { Options { signature=MD5; sparse=yes }
+ File=</tmp/file-list
+ }
+}
+
+FileSet {
+ Name = "CompressedSet"
+ Include {
+ Options { signature=MD5; compression=GZIP }
+ File =</tmp/file-list
+ }
+}
+
+FileSet {
+ Name = "SparseCompressedSet"
+ Include {
+ Options {
+ signature=MD5; compression=GZIP
+ }
+ File= </tmp/file-list
+ }
+}
+
+
+
+#
+# When to do the backups, full backup on first sunday of the month,
+# differential (i.e. incremental since full) every other sunday,
+# and incremental backups other days
+Schedule {
+ Name = "WeeklyCycle"
+ Run = Level=Full 1st sun at 1:05
+ Run = Level=Differential 2nd-5th sun at 1:05
+ Run = Level=Incremental mon-sat at 1:05
+}
+
+# This schedule does the catalog. It starts after the WeeklyCycle
+Schedule {
+ Name = "WeeklyCycleAfterBackup"
+ Run = Level=Full sun-sat at 1:10
+}
+
+# This is the backup of the catalog
+FileSet {
+ Name = "Catalog"
+ Include { Options { signature=MD5 }
+ File=/home/kern/bacula/regress/bin/working/bacula.sql
+ }
+}
+
+# Client (File Services) to backup
+Client {
+ Name = @hostname@-fd
+ Address = @hostname@
+ 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
+ Maximum Concurrent Jobs = 10
+}
+
+Client {
+ Name = @hostname1@-fd
+ Address = @hostname1@
+ FDPort = 9102
+ Catalog = MyCatalog
+ Password = "@hostname1_password@" # password for FileDaemon
+ File Retention = 30d # 30 days
+ Job Retention = 180d # six months
+ AutoPrune = yes # Prune expired Jobs/Files
+ Maximum Concurrent Jobs = 10
+}
+
+Client {
+ Name = @hostname2@-fd
+ Address = @hostname2@
+ FDPort = 9102
+ Catalog = MyCatalog
+ Password = "@hostname2_password@" # password for FileDaemon
+ File Retention = 30d # 30 days
+ Job Retention = 180d # six months
+ AutoPrune = yes # Prune expired Jobs/Files
+ Maximum Concurrent Jobs = 10
+}
+
+Client {
+ Name = @hostname3@-fd
+ Address = @hostname3@
+ FDPort = 9102
+ Catalog = MyCatalog
+ Password = "@hostname3_password@" # password for FileDaemon
+ File Retention = 30d # 30 days
+ Job Retention = 180d # six months
+ AutoPrune = yes # Prune expired Jobs/Files
+ Maximum Concurrent Jobs = 10
+}
+
+
+# Definiton of file storage device
+Storage {
+ Name = File
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = 8103
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage
+ Media Type = File
+ Maximum Concurrent Jobs = 10
+}
+
+Storage {
+ Name = File1
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = 8103
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage1
+ Media Type = File1
+ Maximum Concurrent Jobs = 10
+}
+
+
+# Generic catalog service
+Catalog {
+ Name = MyCatalog
+ dbname = regress; user = regress; password = ""
+}
+
+# Reasonable message delivery -- send most everything to email address
+# and to the console
+Messages {
+ Name = Standard
+ mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r"
+ operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r"
+ MailOnError = @job_email@ = all
+ operator = @job_email@ = mount
+ console = all, !skipped, !terminate, !restored
+#
+# WARNING! the following will create a file that you must cycle from
+# time to time as it will grow indefinitely. However, it will
+# also keep all your messages if the scroll off the console.
+#
+ append = "@working_dir@/log" = all, !skipped
+}
+
+Messages {
+ Name = NoEmail
+ mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r"
+ console = all, !skipped, !terminate
+#
+# WARNING! the following will create a file that you must cycle from
+# time to time as it will grow indefinitely. However, it will
+# also keep all your messages if the scroll off the console.
+#
+ append = "@working_dir@/log" = all, !skipped
+}
+
+#
+# Message delivery for daemon messages (no job).
+Messages {
+ Name = Daemon
+ mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r"
+ mail = @job_email@ = all, !skipped
+ console = all, !skipped, !saved
+ 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
+}
# This is the configuration script for regression testing
#
-if test "x${CONFIG_SHELL}" != "x"; then
- CONFIG_SHELL=/bin/sh
-fi
+. ${1}/config
-# Handle Solaris compiler (possibly some others)
-VERSION="`cc --version | head -1 | awk '{ print $2 }' 2> /dev/null`"
-
-if [ -n "${VERSION}" -a "${VERSION}" = "(GCC)" ]; then
- OPTIMIZE="-O2"
- WARNINGS="-Wall"
-else
- OPTIMIZE="-O"
- WARNINGS="-v"
-fi
-
-CFLAGS="-g ${OPTIMIZE} ${WARNINGS}" \
+CFLAGS="-g -O2 -Wall" \
./configure \
- --sbindir=$1/bin \
- --sysconfdir=$1/bin \
- --mandir=$1/bin \
- --with-pid-dir=$1/working \
- --with-subsys-dir=$1/working \
+ --sbindir=${1}/bin \
+ --sysconfdir=${1}/bin \
+ --mandir=${1}/bin \
+ --with-pid-dir=${1}/working \
+ --with-subsys-dir=${1}/working \
--enable-smartalloc \
--disable-readline \
- --with-working-dir=$1/working \
- --with-dump-email=$2 \
- --with-job-email=$2 \
- --with-smtp-host=$5 \
+ --with-working-dir=${1}/working \
+ --with-dump-email=${EMAIL} \
+ --with-job-email=${EMAIL} \
+ --with-smtp-host=${SMTP_HOST} \
--with-db-name=regress \
--with-db-user=regress \
- $3 \
- --with-baseport=8101 \
- $4 \
- $6
+ ${OPENSSL} \
+ ${TCPWRAPPERS} \
+ ${WHICHDB} \
+ --with-baseport=8101
exit 0
fi
}
+. ./config
+
cwd=`pwd`
-if [ $# != 6 ] ; then
- echo "Incorrect number of arguments. Got $#. Need:"
- echo "setup bacula-src email-address --with-DBNAME --with-tcp-wrappers"
- echo " "
- exit 1
-fi
-if [ ! -d $1 ] ; then
- echo "Arg 1 must be a Bacula release directory."
+if [ ! -d ${BACULA_SOURCE} ] ; then
+ echo "The BACULA_SOURCE environment variable must be a Bacula release directory, but is not."
echo " "
exit 1
fi
rm -rf build bin
# Copy new source
-echo "Copying source from $1"
-cp -rp $1 build
+echo "Copying source from ${BACULA_SOURCE}"
+cp -rp ${BACULA_SOURCE} build
cp scripts/regress-config build
cd build
rm -f Makefile config.cache
# Run Bacula configuration, make, install
-./regress-config ${cwd} $2 $3 $4 $5 $6
+./regress-config ${cwd}
check_exit_code
# Cleanup any win32 build in source
cd src/win32
# file or directory names in the Include directive of the
# FileSet resource.
#
-# For Bacula release 1.33
+# For Bacula release 2.2.2
#
# You might also want to change the default email address
# from root to your address. See the "mail" and "operator"
-#!/usr/bin/python
+#!/usr/bin/env python
from time import time as now
fn = open('time.out', 'w+')
@output /dev/null
messages
@$out tmp/log1.out
+setdebug level=3 dir
+setdebug level=3 storage=DDS-4
+setdebug level=3 client
label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=1
status storage=DDS-4
#
# This script uses the autochanger and two tapes
#
+. scripts/functions
if test x${AUTOCHANGER} = x/dev/null ; then
echo "incremental-2tape test skipped. No autochanger."
exit
# then restore it.
#
cwd=`pwd`
+. scripts/functions
bin/bacula stop 2>&1 >/dev/null
cd bin
./drop_bacula_tables >/dev/null 2>&1
--- /dev/null
+#!/bin/sh
+#
+# Run four jobs at the same time, with two Volumes.
+# Set max Vol bytes of first volume
+# to less than total backup to force Bacula to use the second
+# Volume.
+#
+TestName="multi-client-test"
+JobName=Multi-client
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-test-confs
+/bin/cp -f scripts/multi-client-bacula-dir.conf bin/bacula-dir.conf
+
+change_jobname NightlySave $JobName
+start_test
+
+cat <<END_OF_DATA >tmp/bconcmds
+@output /dev/null
+messages
+@$out tmp/log1.out
+@# Make sure we can contact all clients
+@#setdebug level=100 dir
+status client=${HOST}-fd
+status client=${hostname1}-fd
+status client=${hostname2}-fd
+status client=${hostname3}-fd
+setdebug level=1 dir
+label storage=File1
+TestVolume001
+label storage=File1
+TestVolume002
+update Volume=TestVolume001 MaxVolBytes=900000000
+status storage=File1
+@#llist volume=TestVolume001
+@#llist volume=TestVolume002
+run job=${hostname1} level=Full Storage=File1 yes
+run job=${hostname2} level=Full Storage=File1 yes
+@# run job=${hostname3} level=Full Storage=File1 yes
+status storage=File1
+run job=$JobName level=Full Storage=File1 yes
+@sleep 2
+status dir
+status storage=File1
+@sleep 5
+messages
+wait
+status storage=File1
+messages
+@#
+@# now do a restore
+@#
+@$out tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores client=${hostname}-fd select storage=File1
+unmark *
+mark *
+done
+yes
+wait
+messages
+@output
+status dir
+status storage=File1
+quit
+END_OF_DATA
+
+run_bacula
+stop_bacula
+
+check_two_logs
+#if test "$debug" -eq 1 ; then
+# diff -r ${hostname_files} ${cwd}/tmp/bacula-restores/${hostname_files}
+#else
+# diff -r ${hostname_files} ${cwd}/tmp/bacula-restores/${hostname_files} 2>&1 >/dev/null
+#fi
+#dstat=$?
+dstat=0
+end_test
# then restore it.
#
cwd=`pwd`
+. scripts/functions
scripts/copy-tape-confs
scripts/cleanup-tape
echo "/usr" >/tmp/file-list