瀏覽代碼

initial bareos config

lt07 admin 9 年之前
當前提交
27ab1de9f7
共有 6 個文件被更改,包括 517 次插入0 次删除
  1. 344 0
      bareos-dir.conf
  2. 51 0
      bareos-fd.conf
  3. 73 0
      bareos-sd.conf
  4. 10 0
      bat.conf
  5. 10 0
      bconsole.conf
  6. 29 0
      tray-monitor.conf

+ 344 - 0
bareos-dir.conf

@@ -0,0 +1,344 @@
+#
+# Default Bareos Director configuration file for disk-only backup
+#
+#  For Bareos release 15.2.2 (16 November 2015) -- ubuntu Ubuntu 14.04 LTS
+#
+# 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 /var/lib/bareos/storage
+#
+# The preconfigured backup scheme is as follows:
+#
+#   Full Backups are done on first Saturday at 21:00              (#04)
+#   Full Backups are written into the "Full" Pool                 (#05)
+#   Full Backups are kept for 365 Days                            (#06)
+#
+#   Differential Backups are done on 2nd to 5th Saturday at 21:00 (#07)
+#   Differential Backups are written into the "Differential" Pool (#08)
+#   Differential Backups are kept for 90 Days                     (#09)
+#
+#   Incremental Backups are done monday to friday at 21:00        (#10)
+#   Incremental Backups are written into the "Incremental" Pool   (#11)
+#   Incremental Backups are kept for 30 Days                      (#12)
+#
+#   What you also have to do is to change the default fileset     (#13)
+#   to either one of the demo filesets given or create our own fileset.
+#
+#
+#
+#  For Bareos release 15.2.2 (16 November 2015) -- ubuntu Ubuntu 14.04 LTS
+#
+#
+Director {                            # define myself
+  Name = lto7-dir
+  QueryFile = "/usr/lib/bareos/scripts/query.sql"
+  Maximum Concurrent Jobs = 10
+  Password = "fsiH4bZpifKAyInabNcqmHwV2Z8++kAOzQYCtdr0ipdO"         # Console password
+  Messages = Daemon
+  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 = /usr/lib/bareos/backends
+
+  # remove comment from "Plugin Directory" to load plugins from specified directory.
+  # if "Plugin Names" is defined, only the specified plugins will be loaded,
+  # otherwise all director plugins (*-dir.so) from the "Plugin Directory".
+  #
+  # Plugin Directory = /usr/lib/bareos/plugins
+  # Plugin Names = ""
+}
+
+JobDefs {
+  Name = "DefaultJob"
+  Type = Backup
+  Level = Incremental
+  Client = lto7-fd
+  FileSet = "SelfTest"                     # selftest fileset                            (#13)
+  Schedule = "WeeklyCycle"
+  Storage = File
+  Messages = Standard
+  Pool = Incremental
+  Priority = 10
+  Write Bootstrap = "/var/lib/bareos/%c.bsr"
+  Full Backup Pool = Full                  # write Full Backups into "Full" Pool         (#05)
+  Differential Backup Pool = Differential  # write Diff Backups into "Differential" Pool (#08)
+  Incremental Backup Pool = Incremental    # write Incr Backups into "Incremental" Pool  (#11)
+}
+
+#
+# Define the main nightly save backup job
+#   By default, this job will back up to disk in /var/lib/bareos/storage
+Job {
+  Name = "BackupClient1"
+  JobDefs = "DefaultJob"
+}
+
+#
+# Backup the catalog database (after the nightly save)
+#
+Job {
+  Name = "BackupCatalog"
+  JobDefs = "DefaultJob"
+  Level = Full
+  FileSet="Catalog"
+  Schedule = "WeeklyCycleAfterBackup"
+
+  # This creates an ASCII copy of the catalog
+  # Arguments to make_catalog_backup.pl are:
+  #  make_catalog_backup.pl <catalog-name>
+  RunBeforeJob = "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog"
+
+  # This deletes the copy of the catalog
+  RunAfterJob  = "/usr/lib/bareos/scripts/delete_catalog_backup"
+
+  # This sends the bootstrap via mail for disaster recovery.
+  # Should be sent to another system, please change recipient accordingly
+  Write Bootstrap = "|/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root@localhost" # (#01)
+  Priority = 11                   # run after main backup
+}
+
+#
+# Standard Restore template, to be changed by Console program
+#  Only one such job is needed for all Jobs/Clients/Storage ...
+#
+Job {
+  Name = "RestoreFiles"
+  Type = Restore
+  Client=lto7-fd
+  FileSet = "Linux All"
+  Storage = File
+  Pool = Incremental
+  Messages = Standard
+  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 {
+    Options {
+      Signature = MD5 # calculate md5 checksum per file
+      One FS = No     # change into other filessytems
+      FS Type = ext2  # filesystems of given types will be backed up
+      FS Type = ext3  # others will be ignored
+      FS Type = ext4
+      FS Type = xfs
+      FS Type = zfs
+      FS Type = reiserfs
+      FS Type = jfs
+      FS Type = btrfs
+    }
+    File = /
+  }
+  # Things that usually have to be excluded
+  # You have to exclude /var/lib/bareos/storage
+  # on your bareos server
+  Exclude {
+    File = /var/lib/bareos
+    File = /var/lib/bareos/storage
+    File = /proc
+    File = /tmp
+    File = /.journal
+    File = /.fsck
+  }
+
+}
+
+# fileset just to backup some files for selftest
+FileSet {
+  Name = "SelfTest"
+  Include {
+    Options {
+      Signature = MD5 # calculate md5 checksum per file
+    }
+    File = "/usr/sbin"
+  }
+}
+
+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 {
+  Name = "Catalog"
+  Include {
+    Options {
+      signature = MD5
+    }
+    File = "/var/lib/bareos/bareos.sql" # database dump
+    File = "/etc/bareos"                   # configuration
+  }
+}
+
+# Client (File Services) to backup
+Client {
+  Name = lto7-fd
+  Address = lto7
+  Password = "4cpnIZAfirCJcF05x0y0iYo4NXz4WsnHoYojuUxs75/6"          # password for FileDaemon
+}
+
+#
+# Definition of file storage device
+#
+Storage {
+  Name = File
+# Do not use "localhost" here
+  Address = lto7                # N.B. Use a fully qualified name here
+  Password = "Ia+A/4PGvr4kFgI9CYOZX73qqRXqUi8llZNymggM3k18"
+  Device = FileStorage
+  Media Type = File
+}
+
+#
+# Generic catalog service
+#
+Catalog {
+  Name = MyCatalog
+  # Uncomment the following lines if you want the dbi driver
+  # dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =  
+  #dbdriver = "postgresql"
+  dbdriver = postgresql
+  dbname = bareos
+  dbuser = bareos
+  dbpassword = 0gxmuamUuL5T
+}
+
+#
+# Reasonable message delivery -- send most everything to email address and to the console
+#
+Messages {
+  Name = Standard
+  mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
+  operatorcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r"
+  mail = root@localhost = all, !skipped, !audit # (#02)
+  operator = root@localhost = mount     # (#03)
+  console = all, !skipped, !saved, !audit
+  append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
+  catalog = all, !audit
+}
+
+#
+# Message delivery for daemon messages (no job).
+#
+Messages {
+  Name = Daemon
+  mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r"
+  mail = root@localhost = all, !skipped, !audit # (#02)
+  console = all, !skipped, !saved, !audit
+  append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
+  append = "/var/log/bareos/bareos-audit.log" = audit
+}
+
+#
+# Full Pool definition
+#
+Pool {
+  Name = Full
+  Pool Type = Backup
+  Recycle = yes                       # Bareos can automatically recycle Volumes
+  AutoPrune = yes                     # Prune expired volumes
+  Volume Retention = 365 days         # How long should the Full Backups be kept? (#06)
+  Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
+  Maximum Volumes = 100               # Limit number of Volumes in Pool
+  Label Format = "Full-"              # Volumes will be labeled "Full-<volume-id>"
+}
+
+#
+# Differential Pool definition
+#
+Pool {
+  Name = Differential
+  Pool Type = Backup
+  Recycle = yes                       # Bareos can automatically recycle Volumes
+  AutoPrune = yes                     # Prune expired volumes
+  Volume Retention = 90 days          # How long should the Differential Backups be kept? (#09)
+  Maximum Volume Bytes = 10G          # Limit Volume size to something reasonable
+  Maximum Volumes = 100               # Limit number of Volumes in Pool
+  Label Format = "Differential-"      # Volumes will be labeled "Differential-<volume-id>"
+}
+
+#
+# Incremental Pool definition
+#
+Pool {
+  Name = Incremental
+  Pool Type = Backup
+  Recycle = yes                       # Bareos can automatically recycle Volumes
+  AutoPrune = yes                     # Prune expired volumes
+  Volume Retention = 30 days          # How long should the Incremental Backups be kept?  (#12)
+  Maximum Volume Bytes = 1G           # Limit Volume size to something reasonable
+  Maximum Volumes = 100               # Limit number of Volumes in Pool
+  Label Format = "Incremental-"       # Volumes will be labeled "Incremental-<volume-id>"
+}
+
+#
+# Scratch pool definition
+#
+Pool {
+  Name = Scratch
+  Pool Type = Backup
+}
+
+#
+# Restricted console used by tray-monitor to get the status of the director
+#
+Console {
+  Name = lto7-mon
+  Password = "CLHbqd3OZ/dLWmh1BHJaGgSHtCpcXigknhQtudZLnuGu"
+  CommandACL = status, .status
+  JobACL = *all*
+}

+ 51 - 0
bareos-fd.conf

@@ -0,0 +1,51 @@
+#
+# Default Bareos File Daemon Configuration file
+#
+#  For Bareos release 15.2.2 (16 November 2015) -- ubuntu Ubuntu 14.04 LTS
+#
+# You have to add this client to the Bareos director (bareos-dir.conf, Client resource).
+# In this file (bareos-fd.conf) you have to
+# configure the Bareos director name and
+# set the corresponding password for this client.
+#
+
+FileDaemon {                          # definition of myself
+  Name = lto7-fd
+  Maximum Concurrent Jobs = 20
+
+  # remove comment from "Plugin Directory" to load plugins from specified directory.
+  # if "Plugin Names" is defined, only the specified plugins will be loaded,
+  # otherwise all storage plugins (*-fd.so) from the "Plugin Directory".
+  #
+  # Plugin Directory = /usr/lib/bareos/plugins
+  # Plugin Names = ""
+
+
+  # if compatible is set to yes, we are compatible with bacula
+  # if set to no, new bareos features are enabled which is the default
+  # compatible = yes
+}
+
+#
+# List Directors who are permitted to contact this File daemon
+#
+Director {
+  Name = lto7-dir
+  Password = "4cpnIZAfirCJcF05x0y0iYo4NXz4WsnHoYojuUxs75/6"
+}
+
+#
+# Restricted Director, used by tray-monitor to get the
+#   status of the file daemon
+#
+Director {
+  Name = lto7-mon
+  Password = "i/tJqWTVyQBW1iqKHx4xmfqrm3Tt6Py9f+V0WwSPfqqa"
+  Monitor = yes
+}
+
+# Send all messages except skipped files back to Director
+Messages {
+  Name = Standard
+  director = lto7-dir = all, !skipped, !restored
+}

+ 73 - 0
bareos-sd.conf

@@ -0,0 +1,73 @@
+#
+# Default Bareos Storage Daemon Configuration file
+#
+#  For Bareos release 15.2.2 (16 November 2015) -- ubuntu Ubuntu 14.04 LTS
+#
+# 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 the Bareos director has corresponding changes.
+#
+
+Storage {                             # definition of myself
+  Name = lto7-sd
+  Maximum Concurrent Jobs = 20
+
+  # remove comment from "Plugin Directory" to load plugins from specified directory.
+  # if "Plugin Names" is defined, only the specified plugins will be loaded,
+  # otherwise all storage plugins (*-sd.so) from the "Plugin Directory".
+  #
+  # Plugin Directory = /usr/lib/bareos/plugins
+  # Plugin Names = ""
+}
+
+#
+# List Directors who are permitted to contact Storage daemon
+#
+Director {
+  Name = lto7-dir
+  Password = "Ia+A/4PGvr4kFgI9CYOZX73qqRXqUi8llZNymggM3k18"
+}
+
+#
+# Restricted Director, used by tray-monitor to get the
+#   status of the storage daemon
+#
+Director {
+  Name = lto7-mon
+  Password = "N2RQeE66evi54j+BY0CE5M4g1qsI8v3EC+Yuq26Z+GXT"
+  Monitor = yes
+}
+
+#
+# Devices supported by this Storage daemon
+# To connect, the Director's bareos-dir.conf must have the same Name and MediaType.
+#
+Device {
+  Name = FileStorage
+  Media Type = File
+  Archive Device = /var/lib/bareos/storage
+  LabelMedia = yes;                   # lets Bareos label unlabeled media
+  Random Access = yes;
+  AutomaticMount = yes;               # when device opened, read it
+  RemovableMedia = no;
+  AlwaysOpen = no;
+}
+
+#
+# include additional configuration files, if required
+#
+
+# eg.
+#@/etc/bareos/bareos-sd.d/device-gluster.conf
+
+
+#
+# Send all messages to the Director,
+# mount messages also are sent to the email address
+#
+Messages {
+  Name = Standard
+  director = lto7-dir = all
+}

+ 10 - 0
bat.conf

@@ -0,0 +1,10 @@
+#
+# Bareos Administration Tool (bat) configuration file
+#
+
+Director {
+  Name = lto7-dir
+  DIRport = 9101
+  address = lto7
+  Password = "fsiH4bZpifKAyInabNcqmHwV2Z8++kAOzQYCtdr0ipdO"
+}

+ 10 - 0
bconsole.conf

@@ -0,0 +1,10 @@
+#
+# Bareos User Agent (or Console) Configuration File
+#
+
+Director {
+  Name = lto7-dir
+  DIRport = 9101
+  address = lto7
+  Password = "fsiH4bZpifKAyInabNcqmHwV2Z8++kAOzQYCtdr0ipdO"
+}

+ 29 - 0
tray-monitor.conf

@@ -0,0 +1,29 @@
+#
+# Bareos Tray Monitor Configuration File
+#
+
+Monitor {
+  Name = lto7-mon
+  Password = "CLHbqd3OZ/dLWmh1BHJaGgSHtCpcXigknhQtudZLnuGu"         # password for the Directors
+  RefreshInterval = 30 seconds
+}
+
+Client {
+  Name = lto7-fd
+  Address = lto7
+  FDPort = 9102
+  Password = "i/tJqWTVyQBW1iqKHx4xmfqrm3Tt6Py9f+V0WwSPfqqa"          # password for FileDaemon
+}
+
+Storage {
+  Name = lto7-sd
+  Address = lto7
+  SDPort = 9103
+  Password = "N2RQeE66evi54j+BY0CE5M4g1qsI8v3EC+Yuq26Z+GXT"          # password for StorageDaemon
+}
+
+Director {
+  Name = lto7-dir
+  DIRport = 9101
+  address = lto7
+}