diff --git a/Makefile b/Makefile index 8b34cbb..fdccab1 100644 --- a/Makefile +++ b/Makefile @@ -34,9 +34,6 @@ bareos: all sed: echo "Doing: scripts/do_sed" scripts/do_sed - echo "adapting default fileset for regression tests" - cp bin/bareos-dir.conf bin/bareos-dir.conf.orig - sed 's#File.*/$$#File = /usr/sbin#g' < bin/bareos-dir.conf.orig > bin/bareos-dir.conf # Run all disk tests test: diff --git a/README b/README index 3586d2d..3845fa9 100644 --- a/README +++ b/README @@ -16,6 +16,8 @@ To set it up, create your personal configuration file, by copying prototype.conf to config or simply editing prototype.conf directly then copying it to the file config. +cp prototype.conf config + You must end up with a file named config in the main regress directory that has all the specifications that correspond to your system. diff --git a/configs/scsi-crypto-test/bareos-dir.conf.scsi-crypto-test.in b/configs/scsi-crypto-test/bareos-dir.conf.scsi-crypto-test.in index 0aa8bf1..c67ff76 100644 --- a/configs/scsi-crypto-test/bareos-dir.conf.scsi-crypto-test.in +++ b/configs/scsi-crypto-test/bareos-dir.conf.scsi-crypto-test.in @@ -239,8 +239,9 @@ Storage { # Generic catalog service Catalog { Name = MyCatalog - - dbname = regress; user = root; password = "" + dbname = "@db_name@" + dbuser = "@db_user@" + dbpassword = "@db_password@" } # Reasonable message delivery -- send most everything to email address diff --git a/configs/status-schedule-test/bareos-dir.conf.status-schedule-test.in b/configs/status-schedule-test/bareos-dir.conf.status-schedule-test.in index 7785da5..e158255 100644 --- a/configs/status-schedule-test/bareos-dir.conf.status-schedule-test.in +++ b/configs/status-schedule-test/bareos-dir.conf.status-schedule-test.in @@ -82,7 +82,9 @@ Storage { Catalog { Name = MyCatalog - dbname = regress; user = root; password = "" + dbname = @db_name@ + dbuser = "@db_user@" + dbpassword = "@db_password@" } Messages { diff --git a/scripts/bareos-dir.conf.in b/scripts/bareos-dir.conf.in index 737e325..8a7ec06 100644 --- a/scripts/bareos-dir.conf.in +++ b/scripts/bareos-dir.conf.in @@ -1,27 +1,4 @@ # -# Default Bareos Director configuration file for disk-only backup -# -# Each configuration item has a reference number that shows -# where this property can be changed in the configuration file. -# Search for the number to find the correct line. -# -# You have to configure the following accoring to your environment: -# -# (#01)Email Address for bareos disaster recovery. -# Specify a mailaddress outside of your backupserver. -# There will be one mail per day. -# -# (#02)Email Address for bareos reports. (Mail Command) -# This mail address will recieve a report about each backup job. -# It will be sent after the backupjob is complete. -# Has to be configured twice ("Standard" and "Daemon" Message Ressources) -# -# (#03)Email Address for bareos operator. (Operator Command) -# This mail address will recieve a mail immediately when the -# bareos system needs an operator intervention. -# May be the same address as in (#02) -# -# # This disk-only setup stores all data into @archivedir@ # # The preconfigured backup scheme is as follows: @@ -48,15 +25,9 @@ Director { # define myself QueryFile = "@scriptdir@/query.sql" Maximum Concurrent Jobs = 10 Password = "@dir_password@" # Console password - Messages = Daemon + Messages = Standard Auditing = yes - # Enable the Heartbeat if you experience connection losses - # (eg. because of your router or firewall configuration). - # Additionally the Heartbeat can be enabled in bareos-sd and bareos-fd. - # - # Heartbeat Interval = 1m - # remove comment in next line to load dynamic backends from specified directory # Backend Directory = @backenddir@ @@ -73,8 +44,7 @@ JobDefs { Type = Backup Level = Incremental Client = @basename@-fd - FileSet = "SelfTest" # selftest fileset (#13) - Schedule = "WeeklyCycle" + FileSet = "SelfTest" Storage = File Messages = Standard Pool = Incremental @@ -132,26 +102,6 @@ Job { Where = /tmp/bareos-restores } - -FileSet { - Name = "Windows All Drives" - Enable VSS = yes - Include { - Options { - Signature = MD5 - Drive Type = fixed - IgnoreCase = yes - WildFile = "[A-Z]:/pagefile.sys" - WildDir = "[A-Z]:/RECYCLER" - WildDir = "[A-Z]:/$RECYCLE.BIN" - WildDir = "[A-Z]:/System Volume Information" - Exclude = yes - } - File = / - } -} - - FileSet { Name = "Linux All" Include { @@ -180,32 +130,28 @@ FileSet { File = /.journal File = /.fsck } +} +FileSet { + Name = FS_TESTJOB1 + Include { + Options { + Signature = MD5 + } + File=<@tmpdir@/file-list + } } -# fileset just to backup some files for selftest FileSet { Name = "SelfTest" Include { Options { - Signature = MD5 # calculate md5 checksum per file + Signature = MD5 } - File = "@sbindir@" + File = "@builddir@" } } -Schedule { - Name = "WeeklyCycle" - Run = Full 1st sat at 21:00 # (#04) - Run = Differential 2nd-5th sat at 21:00 # (#07) - Run = Incremental mon-fri at 21:00 # (#10) -} - -# This schedule does the catalog. It starts after the WeeklyCycle -Schedule { - Name = "WeeklyCycleAfterBackup" - Run = Full mon-fri at 21:10 -} # This is the backup of the catalog FileSet { @@ -243,8 +189,6 @@ Storage { # Catalog { Name = MyCatalog - # Uncomment the following lines if you want the dbi driver - @uncomment_dbi@ dbdriver = "dbi:@DEFAULT_DB_TYPE@"; dbaddress = 127.0.0.1; dbport = @db_port@ #dbdriver = "@DEFAULT_DB_TYPE@" dbdriver = "XXX_REPLACE_WITH_DATABASE_DRIVER_XXX" dbname = "@db_name@" @@ -257,27 +201,10 @@ Catalog { # Messages { Name = Standard - mailcommand = "@bindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r" - operatorcommand = "@bindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r" - mail = @job_email@ = all, !skipped, !audit # (#02) - operator = @job_email@ = mount # (#03) console = all, !skipped, !saved, !audit - append = "@logdir@/bareos.log" = all, !skipped, !audit catalog = all, !audit } -# -# Message delivery for daemon messages (no job). -# -Messages { - Name = Daemon - mailcommand = "@bindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r" - mail = @job_email@ = all, !skipped, !audit # (#02) - console = all, !skipped, !saved, !audit - append = "@logdir@/bareos.log" = all, !skipped, !audit - append = "@logdir@/bareos-audit.log" = audit -} - # # Full Pool definition # diff --git a/scripts/create_sed b/scripts/create_sed index 37cd4ea..622a627 100755 --- a/scripts/create_sed +++ b/scripts/create_sed @@ -32,9 +32,13 @@ dbengine=`echo ${WHICHDB} | sed -e 's/--with-//' -e 's/=.*//'` bversion=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/include/version.h` bdate=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/include/version.h` builddir="${src}" +hostname="${hostname:-$HOST}" # Create sed command script -echo "s%@sbindir@%${bin}%g" >${out} +>${out} +echo "s%@archivedir@%${tmp}%g" >>${out} +echo "s%@bindir@%${bin}%g" >>${out} +echo "s%@sbindir@%${bin}%g" >>${out} echo "s%@scriptdir@%${scripts}%g" >>${out} echo "s%@working_dir@%${working}%g" >>${out} echo "s%@piddir@%${working}%g" >>${out} @@ -44,11 +48,11 @@ echo "s%@autochanger@%${AUTOCHANGER}%g" >>${out} echo "s%@changer_script@%${AUTOCHANGER_SCRIPT}%g" >>${out} echo "s%@tmpdir@%${tmp}%g" >>${out} echo "s%@logdir@%${tmp}%g" >>${out} -echo "s%@hostname@%${HOST}%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@%${tmp}/disk-changer%g" >>${out} +echo "s%@basename@%${HOST}%g" >>${out} echo "s%@hostname@%${hostname}%g" >>${out} echo "s%@hostname1@%${hostname1}%g" >>${out} echo "s%@hostname2@%${hostname2}%g" >>${out} @@ -61,6 +65,7 @@ echo "s%@hostname1_password@%${hostname1_password}%g" >>${out} echo "s%@hostname2_password@%${hostname2_password}%g" >>${out} echo "s%@hostname3_password@%${hostname3_password}%g" >>${out} echo "s%@dirport@%${dirport}%g" >>${out} +echo "s%@dir_port@%${dirport}%g" >>${out} echo "s%@sdport@%${sdport}%g" >>${out} echo "s%@sdport2@%${sdport2}%g" >>${out} echo "s%@fdport@%${fdport}%g" >>${out} @@ -84,3 +89,4 @@ echo "s%@db_password@%${db_password}%g" >>${out} echo "s%@builddir@%${builddir}%g" >>${out} echo "s%@BUILD_DIR@%${builddir}%g" >>${out} echo "s%@confdir@%${scripts}%g" >>${out} +echo "s%@uncomment_dbi@%#%g" >>${out} diff --git a/scripts/setup b/scripts/setup index ec4c74f..e46c3f7 100755 --- a/scripts/setup +++ b/scripts/setup @@ -154,8 +154,3 @@ cd ${cwd} # bin/bareos start bin/bareos stop - -# -# Save Bareos default conf files for later use -# -cp -f bin/*.conf scripts diff --git a/tests/acl-xattr-test b/tests/acl-xattr-test index df79d00..d8299a3 100755 --- a/tests/acl-xattr-test +++ b/tests/acl-xattr-test @@ -100,6 +100,7 @@ rm -rf $d mkdir -p $d mkdir -p $d/acl-dir cp ${cwd}/bin/bconsole $d +ls -la $d case `uname -s` in Linux) @@ -208,7 +209,7 @@ cat <${cwd}/tmp/bconcmds @$out /dev/null messages @$out ${cwd}/tmp/log1.out -label volume=TestVolume001 storage=File1 pool=Full slot=1 drive=0 +label volume=TestVolume001 storage=File pool=Full slot=1 drive=0 @#setdebug level=400 trace=1 client @#setdebug level=300 trace=1 director @#setdebug level=300 trace=1 storage=File1 @@ -219,7 +220,7 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out -restore where=${cwd}/tmp/bareos-restores select all done +restore restorejob=RestoreFiles where=${cwd}/tmp/bareos-restores select all done yes wait messages @@ -227,7 +228,7 @@ quit END_OF_DATA run_bareos -check_for_zombie_jobs storage=File1 +check_for_zombie_jobs storage=File stop_bareos rd=$cwd/tmp/bareos-restores$cwd/build/acl