]> git.sur5r.net Git - bacula/bacula/commitdiff
Update to trunk
authorKern Sibbald <kern@sibbald.com>
Fri, 14 Sep 2007 17:17:12 +0000 (17:17 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 14 Sep 2007 17:17:12 +0000 (17:17 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@5562 91ce42f0-d328-0410-95d8-f526ca767f89

21 files changed:
regress/Makefile [new file with mode: 0644]
regress/Makefile.in [deleted file]
regress/README
regress/README.mingw32
regress/config [deleted file]
regress/endtime
regress/prototype.conf
regress/scripts/bacula-dir.conf.regexwhere.in
regress/scripts/do_sed
regress/scripts/flist
regress/scripts/functions
regress/scripts/multi-client-bacula-dir.conf.in [new file with mode: 0644]
regress/scripts/regress-config
regress/scripts/setup
regress/scripts/test-bacula-dir.conf.in
regress/starttime
regress/tests/2drive-incremental-2disk
regress/tests/incremental-2tape
regress/tests/lib-tape-root
regress/tests/multi-client-test [new file with mode: 0755]
regress/tests/usr-tape-root

diff --git a/regress/Makefile b/regress/Makefile
new file mode 100644 (file)
index 0000000..d33f78c
--- /dev/null
@@ -0,0 +1,69 @@
+#
+# 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
+                     
diff --git a/regress/Makefile.in b/regress/Makefile.in
deleted file mode 100644 (file)
index 6d8c250..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# 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
-                     
index 09dbc73bbefce3931902acd06a135e5135eff348..d289c630a3e70ca2817d11e49e5661e97e1d4ea6 100644 (file)
@@ -13,13 +13,12 @@ system uses MySQL, you can use SQLite here.
 
 
 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).
@@ -38,7 +37,6 @@ SQLite as the database, while my production uses MySQL.
 
 Then do:
 
-   ./config xxx.conf
    make setup
 
 You run the above one time.  This will build a Makefile from
index c6f1cfe671edd40efe9f432207c80730c39f6c89..14e6df00877dc704884da0167ecf7170ee7eb034 100644 (file)
@@ -7,14 +7,14 @@ Date: 30 August 2007 04:09:00
 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
@@ -35,8 +35,10 @@ bin\bacula_cats.dll > nul" and replace "cats_sqlite.dll" with
 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.
diff --git a/regress/config b/regress/config
deleted file mode 100755 (executable)
index 6088502..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#/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
index faf419f70db19fbcc773e05c163554954d370290..0502fec3768317491f578d0b6257c34cc2972278 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 from time import time as now 
  
 t = now()
index eebf5943608eb98de56dbe6c02b4256869b54e70..17053a9423667e38f66a690ef74c4b811135134a 100644 (file)
@@ -35,3 +35,7 @@ TCPWRAPPERS="--with-tcp-wrappers"
 #  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"
index 89aed77398e7ebc1dc5563b5ff2629074b84593a..f522aaf8b3765a63ecaaf9f6d1e240584388b749 100644 (file)
@@ -38,7 +38,7 @@ JobDefs {
   Name = "DefaultRestore"
   Type = Restore
   Storage = File
-  Client=localhost-fd 
+  Client=@hostname@-fd
   FileSet="FS_TESTJOB"
   Messages = Standard
   Pool = Default
index ea614601b3375bc1823415fa69f751c2837cec57..b502715ffa17701b864edf0e0b6f609ab4fdc388 100755 (executable)
@@ -1,44 +1,40 @@
 #!/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
@@ -79,7 +75,7 @@ sed s%/tmp%${cwd}/tmp%g /tmp/bac$$ >${cwd}/bin/bacula-sd.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
index 87f103defe489e8be1f778e1dcfab2bdd66251c8..d33e45a88b3ead13cd5aa46e4186ff0c6a81bc03 100644 (file)
@@ -10,7 +10,7 @@
 /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
index 4791db9c7a247da2cf47ce5042ab4933cd82e8ee..910b57fe047fcc0b0d96c6285575fb6204978f14 100644 (file)
@@ -177,6 +177,5 @@ else
    set_debug 0
 fi
 
-# Source the second drive variables
-touch ${cwd}/config.out
-. ${cwd}/config.out
+# Source the configuration variables
+. ${cwd}/config
diff --git a/regress/scripts/multi-client-bacula-dir.conf.in b/regress/scripts/multi-client-bacula-dir.conf.in
new file mode 100644 (file)
index 0000000..fdd4f0a
--- /dev/null
@@ -0,0 +1,376 @@
+#
+# 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
+}
index f68ea08fb65d9771ca5a77672406bc139bbc30ba..3d288c83f76930e3c8c9656859176ae34b96738a 100755 (executable)
@@ -3,39 +3,26 @@
 # 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
index 9b592f6664ef357a560c6aea79426ea9647e3379..8292d8717fa612e4bdfced7717210a8224b6f768 100755 (executable)
@@ -11,27 +11,23 @@ check_exit_code()
    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
index f2a065e9d53a6f2082d8a69c70b404c7dd1010ee..4520fa83f374610f6475e8a9da2b23a6bef4e7a0 100644 (file)
@@ -5,7 +5,7 @@
 #   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"
index 5c2bd411c6667af2d37d1904741d205596e87705..e6aa3ea6a9ba0ab74096915f73a5d4edb21c4594 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 from time import time as now 
 
 fn = open('time.out', 'w+')
index 4a4b84a8bee634e2795920ce604d21a6612204ed..ea7f5c725bea6515db8e07a48a6a6e9fb38f95f7 100755 (executable)
@@ -39,6 +39,9 @@ cat <<END_OF_DATA >tmp/bconcmds
 @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
index 5d94967d040fe8930bd27bd76efbf839de1a50b5..35b2621c7a2aefde62b2174e38b9694f58ef119e 100755 (executable)
@@ -5,6 +5,7 @@
 #
 # 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
index 06289cd1d4df0688c835e5ec76b6b6d4d5faa583..c0cec63d7668a0c91e71be581074cd486cd07cc8 100755 (executable)
@@ -4,6 +4,7 @@
 #   then restore it.
 #
 cwd=`pwd`
+. scripts/functions
 bin/bacula stop 2>&1 >/dev/null
 cd bin
 ./drop_bacula_tables >/dev/null 2>&1
diff --git a/regress/tests/multi-client-test b/regress/tests/multi-client-test
new file mode 100755 (executable)
index 0000000..c2dc95b
--- /dev/null
@@ -0,0 +1,79 @@
+#!/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
index 0f5002d92836f1c40bf0f024e553913d0631e5f5..64d9040c35bb6696093a3397e9ff386d02025602 100755 (executable)
@@ -4,6 +4,7 @@
 #   then restore it.
 #
 cwd=`pwd`
+. scripts/functions
 scripts/copy-tape-confs
 scripts/cleanup-tape
 echo "/usr" >/tmp/file-list