]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport regress/scripts/cdp-plugin-test-bacula-dir.conf.in
authorHenrique <henrique.faria@baculasystems.com>
Fri, 4 Sep 2020 11:34:30 +0000 (13:34 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:56 +0000 (09:02 +0100)
This commit is the result of the squash of the following main commits:

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed Jul 17 14:23:03 2019 -0300

    cdp-plugin: created regress script for linux

regress/scripts/cdp-plugin-test-bacula-dir.conf.in [new file with mode: 0644]
regress/scripts/cdp-plugin-test-bacula-sd.conf.in [new file with mode: 0644]

diff --git a/regress/scripts/cdp-plugin-test-bacula-dir.conf.in b/regress/scripts/cdp-plugin-test-bacula-dir.conf.in
new file mode 100644 (file)
index 0000000..292dcc4
--- /dev/null
@@ -0,0 +1,178 @@
+#
+# 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 1.39 or later
+#
+#  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 = @dirport@                # where we listen for UA connections
+  QueryFile = "@scriptdir@/query.sql"
+  WorkingDirectory = "@working_dir@"
+  PidDirectory = "@piddir@"
+  SubSysDirectory = "@subsysdir@"
+  PluginDirectory = "@sbindir@/plugins"
+  Maximum Concurrent Jobs = 4
+  Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"         # Console password
+  Messages = Standard
+}
+
+Job {
+  Name = "PluginCdpTest"
+  JobDefs = "BackupJob"
+  FileSet="TestPluginCdpSet"
+}
+
+JobDefs {
+  Name = "BackupJob"
+  Type = Backup
+  Pool = Default
+  Storage = File1
+  Messages = Standard
+  Priority = 10
+  Client=@hostname@-fd 
+  Write Bootstrap = "@working_dir@/%n-%f.bsr"
+}
+
+# Standard Restore template, to be changed by Console program
+Job {
+  Name = "RestoreFiles"
+  Type = Restore
+  Client=@hostname@-fd 
+  FileSet="Full Set"
+  Storage = File1
+  Messages = Standard
+  Pool = Default
+  Where = @tmpdir@/bacula-restores
+}
+
+
+# List of files to be backed up
+FileSet {
+  Name = "Full Set"
+  Include {  
+     Options { signature=MD5; }
+     File = /tmp
+  }
+}
+
+FileSet {
+  Name = "TestPluginCdpSet"
+  Include {
+    Options {
+      signature=MD5
+    }
+    Plugin = "cdp: userHome=@tmpdir@/testUserHome"
+  }
+}
+
+#
+# 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
+}
+
+# Client (File Services) to backup
+Client {
+  Name = @hostname@-fd
+  Address = @hostname@
+  FDPort = @fdport@
+  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 = 4
+}
+
+# Definiton of file storage device
+#Autochanger {
+#  Name = File
+#  Address = @hostname@                # N.B. Use a fully qualified name here
+#  SDPort = @sdport@
+#  Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+#  Device = FileChgr
+#  Media Type = File
+#  Maximum Concurrent Jobs = 4
+#  Autochanger = File
+#}
+
+Autochanger {
+  Name = File1
+  Address = @hostname@                # N.B. Use a fully qualified name here
+  SDPort = @sdport@
+  Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+  Device = FileChgr1 
+  Media Type = File1
+  Maximum Concurrent Jobs = 4
+  Autochanger = File1
+}
+
+# Generic catalog service
+Catalog {
+  Name = MyCatalog
+  @libdbi@
+  dbname = @db_name@; user = @db_user@; password = "@db_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
+  catalog = 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
+  catalog = 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
+# Label Format = "TEST-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}:${NumVols}"
+# Maximum Volume Jobs = 1
+}
diff --git a/regress/scripts/cdp-plugin-test-bacula-sd.conf.in b/regress/scripts/cdp-plugin-test-bacula-sd.conf.in
new file mode 100644 (file)
index 0000000..f0232df
--- /dev/null
@@ -0,0 +1,113 @@
+#
+# Default Bacula Storage Daemon Configuration file
+#
+#  For Bacula release 1.33
+#
+# You may need to change the name of your tape drive
+#   on the "Archive Device" directive in the Device
+#   resource.  If you change the Name and/or the 
+#   "Media Type" in the Device resource, please ensure
+#   that dird.conf has corresponding changes.
+#
+
+Storage {                             # definition of myself
+  Name = @hostname@-sd
+  SDPort = @sdport@                  # Director's port      
+  WorkingDirectory = "@working_dir@"
+  Pid Directory = "@piddir@"
+  Subsys Directory = "@subsysdir@"
+  Plugin Directory = "@sbindir@/plugins"
+  Maximum Concurrent Jobs = 100
+}
+
+#
+# List Directors who are permitted to contact Storage daemon
+#
+Director {
+  Name = @hostname@-dir
+  Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+}
+
+#
+# Define a Virtual autochanger
+#
+Autochanger {
+  Name = FileChgr1
+  Device = FileChgr1-Dev1, FileChgr1-Dev2
+  Changer Command = ""
+  Changer Device = /dev/null
+}
+
+Device {
+  Name = FileChgr1-Dev1
+  Media Type = File1
+  Archive Device = @tmpdir@ 
+  LabelMedia = yes;                   # lets Bacula label unlabeled media
+  Random Access = Yes;
+  AutomaticMount = yes;               # when device opened, read it
+  RemovableMedia = no;
+  AlwaysOpen = no;
+  Maximum Concurrent Jobs = 5
+}
+
+Device {
+  Name = FileChgr1-Dev2
+  Media Type = File1
+  Archive Device = @tmpdir@ 
+  LabelMedia = yes;                   # lets Bacula label unlabeled media
+  Random Access = Yes;
+  AutomaticMount = yes;               # when device opened, read it
+  RemovableMedia = no;
+  AlwaysOpen = no;
+  Maximum Concurrent Jobs = 5
+}
+
+#Device {
+#  Name = "HP DLT 80"
+#  Media Type = DLT8000
+#  Archive Device = /dev/nst0
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = yes;
+#  RemovableMedia = yes;
+#}
+
+#Device {
+#  Name = SDT-7000                     # 
+#  Media Type = DDS-2
+#  Archive Device = /dev/nst0
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = yes;
+#  RemovableMedia = yes;
+#}
+
+#Device {
+#  Name = Floppy
+#  Media Type = Floppy
+#  Archive Device = /mnt/floppy
+#  RemovableMedia = yes;
+#  Random Access = Yes;
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = no;
+#}
+
+#
+# A very old Exabyte with no end of media detection
+#
+#Device {
+#  Name = "Exabyte 8mm"
+#  Media Type = "8mm"
+#  Archive Device = /dev/nst0
+#  Hardware end of medium = No;
+#  AutomaticMount = yes;               # when device opened, read it
+#  AlwaysOpen = Yes;
+#  RemovableMedia = yes;
+#}
+
+# 
+# Send all messages to the Director, 
+# mount messages also are sent to the email address
+#
+Messages {
+  Name = Standard
+  director = @hostname@-dir = all, !terminate
+}