Advertisement
GrandZ

bacula-dir.conf

Oct 3rd, 2016
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.50 KB | None | 0 0
  1. #
  2. # Default Bacula Director Configuration file
  3. #
  4. #  The only thing that MUST be changed is to add one or more
  5. #   file or directory names in the Include directive of the
  6. #   FileSet resource.
  7. #
  8. #  For Bacula release 7.0.5 (28 July 2014) -- ubuntu 16.04
  9. #
  10. #  You might also want to change the default email address
  11. #   from root to your address.  See the "mail" and "operator"
  12. #   directives in the Messages resource.
  13. #
  14.  
  15. Director {                            # define myself
  16.   Name = ubuntu-server-dir
  17.   DIRport = 9101                # where we listen for UA connections
  18.   QueryFile = "/etc/bacula/scripts/query.sql"
  19.   WorkingDirectory = "/var/lib/bacula"
  20.   PidDirectory = "/var/run/bacula"
  21.   Maximum Concurrent Jobs = 20
  22.   Password = "Qolp13u1YuevbFT4eKHVDW_AYmHoipAL-"         # Console password
  23.   Messages = Standard
  24.   DirAddress = 172.17.39.13
  25. }
  26.  
  27. JobDefs {
  28.   Name = "DefaultJob"
  29.   Type = Backup
  30.   Level = Incremental
  31.   Client = ubuntu-server-fd
  32.   FileSet = "Full Set"
  33.   Schedule = "WeeklyCycle"
  34.   Storage = backup-UFS
  35.   Messages = Standard
  36.   Pool = File
  37.   SpoolAttributes = yes
  38.   Priority = 10
  39.   Write Bootstrap = "/var/lib/bacula/%c.bsr"
  40. }
  41.  
  42.  
  43. #
  44. # Define the main nightly save backup job
  45. #   By default, this job will back up to disk in /nonexistant/path/to/file/archive/dir
  46. Job {
  47.   Name = "BackupClient1"
  48.   JobDefs = "DefaultJob"
  49. }
  50.  
  51. # Backup the catalog database (after the nightly save)
  52. Job {
  53.   Name = "BackupCatalog"
  54.   JobDefs = "DefaultJob"
  55.   Level = Full
  56.   FileSet="Catalog"
  57.   Schedule = "WeeklyCycleAfterBackup"
  58.   # This creates an ASCII copy of the catalog
  59.   # Arguments to make_catalog_backup.pl are:
  60.   #  make_catalog_backup.pl <catalog-name>
  61.   RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
  62.   # This deletes the copy of the catalog
  63.   RunAfterJob  = "/etc/bacula/scripts/delete_catalog_backup"
  64.   Write Bootstrap = "/var/lib/bacula/%n.bsr"
  65.   Priority = 11                   # run after main backup
  66. }
  67.  
  68. #
  69. # Standard Restore template, to be changed by Console program
  70. #  Only one such job is needed for all Jobs/Clients/Storage ...
  71. #
  72. Job {
  73.   Name = "RestoreFiles"
  74.   Type = Restore
  75.   Client=ubuntu-server-fd
  76.   FileSet="Full Set"
  77.   Storage = backup-UFS
  78.   Pool = File
  79.   Messages = Standard
  80.   Where = /b_backup/restore
  81. }
  82.  
  83.  
  84. # List of files to be backed up
  85. FileSet {
  86.   Name = "Full Set"
  87.   Include {
  88.     Options {
  89.       signature = MD5
  90.     }
  91.     File = /usr/sbin
  92.   }
  93.  
  94. #
  95. # If you backup the root directory, the following two excluded
  96. #   files can be useful
  97. #
  98.   Exclude {
  99.     File = /var/lib/bacula
  100.     File = /nonexistant/path/to/file/archive/dir
  101.     File = /proc
  102.     File = /tmp
  103.     File = /sys
  104.     File = /.journal
  105.     File = /.fsck
  106.   }
  107. }
  108.  
  109. #
  110. # When to do the backups, full backup on first sunday of the month,
  111. #  differential (i.e. incremental since full) every other sunday,
  112. #  and incremental backups other days
  113. Schedule {
  114.   Name = "WeeklyCycle"
  115.   Run = Full 1st sun at 23:05
  116.   Run = Differential 2nd-5th sun at 23:05
  117.   Run = Incremental mon-sat at 23:05
  118. }
  119.  
  120. # This schedule does the catalog. It starts after the WeeklyCycle
  121. Schedule {
  122.   Name = "WeeklyCycleAfterBackup"
  123.   Run = Full sun-sat at 23:10
  124. }
  125.  
  126. # This is the backup of the catalog
  127. FileSet {
  128.   Name = "Catalog"
  129.   Include {
  130.     Options {
  131.       signature = MD5
  132.     }
  133.     File = "/var/lib/bacula/bacula.sql"
  134.   }
  135. }
  136.  
  137. # Client (File Services) to backup
  138. Client {
  139.   Name = ubuntu-server-fd
  140.   Address = 172.17.39.13
  141.   FDPort = 9102
  142.   Catalog = MyCatalog
  143.   Password = "mn8VHiTz7ak1cO9AOEgEzJrKUrqCSB9ba"          # password for FileDaemon
  144.   File Retention = 60 days            # 60 days
  145.   Job Retention = 6 months            # six months
  146.   AutoPrune = yes                     # Prune expired Jobs/Files
  147. }
  148.  
  149.  
  150. # Definition of file Virtual Autochanger device
  151. Storage {
  152.   Name = backup-UFS
  153. # Do not use "localhost" here
  154.   Address = 172.17.39.13                # N.B. Use a fully qualified name here
  155.   SDPort = 9103
  156.   Password = "LJVl2KSqVxJ__GghjLpWis4HWaWvK4yMh"
  157.   Device = backup-UFS
  158.   Media Type = loc-file
  159.   Maximum Concurrent Jobs = 10        # run up to 10 jobs a the same time
  160.     Autochanger = no
  161. }
  162.  
  163. # Generic catalog service
  164. Catalog {
  165.   Name = MyCatalog
  166.   dbname = "bacula"; dbuser = "bacula"; dbpassword = "PaSSw0rd"
  167. }
  168.  
  169. # Reasonable message delivery -- send most everything to email address
  170. #  and to the console
  171. Messages {
  172.   Name = Standard
  173.   mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  174.   operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  175.   mail = root = all, !skipped
  176.   operator = root = mount
  177.   console = all, !skipped, !saved
  178. #
  179. # WARNING! the following will create a file that you must cycle from
  180. #          time to time as it will grow indefinitely. However, it will
  181. #          also keep all your messages if they scroll off the console.
  182. #
  183.   append = "/var/log/bacula/bacula.log" = all, !skipped
  184.   catalog = all, !skipped, !saved
  185. }
  186.  
  187.  
  188. #
  189. # Message delivery for daemon messages (no job).
  190. Messages {
  191.   Name = Daemon
  192.   mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  193.   mail = root = all, !skipped
  194.   console = all, !skipped, !saved
  195.   append = "/var/log/bacula/bacula.log" = all, !skipped, !saved
  196. }
  197.  
  198. # Default pool definition
  199. Pool {
  200.   Name = Default
  201.   Pool Type = Backup
  202.   Recycle = yes                       # Bacula can automatically recycle Volumes
  203.   AutoPrune = yes                     # Prune expired volumes
  204.   Volume Retention = 365 days         # one year
  205.   Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  206.   Maximum Volumes = 100               # Limit number of Volumes in Pool
  207. }
  208.  
  209. # File Pool definition
  210. Pool {
  211.   Name = File
  212.   Pool Type = Backup
  213.   Recycle = yes                       # Bacula can automatically recycle Volumes
  214.   AutoPrune = yes                     # Prune expired volumes
  215.   Volume Retention = 365 days         # one year
  216.   Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  217.   Maximum Volumes = 100               # Limit number of Volumes in Pool
  218.   Label Format = "Vol-"               # Auto label
  219. }
  220.  
  221.  
  222. # Scratch pool definition
  223. Pool {
  224.   Name = Scratch
  225.   Pool Type = Backup
  226. }
  227.  
  228. #
  229. # Restricted console used by tray-monitor to get the status of the director
  230. #
  231. Console {
  232.   Name = ubuntu-server-mon
  233.   Password = "8yZfTnT8KyA5NhzE2JPdJS25yCv2i4p5S"
  234.  
  235.   CommandACL = status, .status
  236. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement