SHARE
TWEET

Untitled

a guest Dec 13th, 2016 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  For Bacula release 7.4.4 (28 September 2016) -- ubuntu 16.04
  2. Director {                            # define myself
  3.   Name = node3-dir
  4.   DIRport = 9101                # where we listen for UA connections
  5.   QueryFile = "/etc/bacula/etc/query.sql"
  6.   WorkingDirectory = "/etc/bacula/working"
  7.   PidDirectory = "/etc/bacula/working"
  8.   Maximum Concurrent Jobs = 20
  9.   Password = "6qr5kCtSFwkbihSz6yOnszPpjcLU52UvTaRhGcfC0rpz"         # Console password
  10.   Messages = Daemon
  11. }
  12.  
  13. JobDefs {
  14.   Name = "DefaultJob"
  15.   Type = Backup
  16.   Level = Incremental
  17.   Client = node3-fd
  18.   FileSet = "Full Set"
  19.   Schedule = "WeeklyCycle"
  20.   Storage = node3-sd
  21.   Messages = Standard
  22.   Pool = File
  23.   SpoolAttributes = yes
  24.   Priority = 10
  25.   Write Bootstrap = "/etc/bacula/working/%c.bsr"
  26. }
  27. # Define the main nightly save backup job
  28. # By default, this job will back up to disk in /tmp
  29. ###################################################备份任务开始##############################################################
  30. Job {
  31.   Name = "BackupClient1"
  32.   JobDefs = "DefaultJob"
  33. }
  34. ###################################################备份任务结束##############################################################
  35.  
  36. ###################################################备份catalog开始##############################################################
  37. # Backup the catalog database (after the nightly save)
  38. Job {
  39.   Name = "BackupCatalog"
  40.   JobDefs = "DefaultJob"
  41.   Level = Full
  42.   FileSet="Catalog"
  43.   Schedule = "WeeklyCycleAfterBackup"
  44.   RunBeforeJob = "/etc/bacula/etc/make_catalog_backup.pl MyCatalog"
  45.   RunAfterJob  = "/etc/bacula/etc/delete_catalog_backup"
  46.   Write Bootstrap = "/etc/bacula/working/%n.bsr"
  47.   Priority = 11                   # run after main backup
  48. }
  49.  
  50. ###################################################备份catalog结束##############################################################
  51. ###################################################恢复任务开始##############################################################
  52. # Standard Restore template, to be changed by Console program
  53. #  Only one such job is needed for all Jobs/Clients/Storage ...
  54. Job {
  55.   Name = "RestoreFiles"
  56.   Type = Restore
  57.   Client=node3-fd
  58.   FileSet="Full Set"
  59.   Storage = node3-sd
  60.   Pool = File
  61.   Messages = Standard
  62.   Where = /tmp/bacula-restores
  63. }
  64. ###################################################恢复任务结束##############################################################
  65.  
  66. ###################################################FileSet and Schedule for backup 开始#########################################
  67. # List of files to be backed up
  68. FileSet {
  69.   Name = "Full Set"
  70.   Include {
  71.     Options {
  72.       signature = MD5
  73.     }
  74.     File = /opt/data
  75.   }
  76.  
  77.   Exclude {
  78.     File = /etc/bacula/working
  79.     File = /proc
  80.     File = /sys
  81.     File = /.journal
  82.     File = /.fsck
  83.   }
  84. }
  85.  
  86. # When to do the backups, full backup on first sunday of the month,
  87. #  differential (i.e. incremental since full) every other sunday,
  88. #  and incremental backups other days
  89. Schedule {
  90.   Name = "WeeklyCycle"
  91.   Run = Full 1st sun at 23:55
  92.   Run = Differential 2nd-5th sun at 23:55
  93.   Run = Incremental mon-sat at 23:55
  94. }
  95.  
  96. ###################################################FileSet and Schedule for backup 结束#########################################
  97.  
  98. ###################################################FileSet and Schedule for catalog 开始#########################################
  99. # This schedule does the catalog. It starts after the WeeklyCycle
  100. Schedule {
  101.   Name = "WeeklyCycleAfterBackup"
  102.   Run = Full sun-sat at 23:10
  103. }
  104.  
  105. # This is the backup of the catalog
  106. FileSet {
  107.   Name = "Catalog"
  108.   Include {
  109.     Options {
  110.       signature = MD5
  111.     }
  112.     File = "/etc/bacula/working/bacula.sql"
  113.   }
  114. }
  115. ###################################################FileSet and Schedule for catalog 结束#########################################
  116. ###################################################client and storage for backup 开始    #########################################
  117. Client {
  118.   Name = node3-fd
  119.   Address = 127.0.0.1
  120.   FDPort = 9102
  121.   Catalog = MyCatalog
  122.   Password = "kOOKp2AtxshoIxlemTDTvUH/awCzUjIarNEShhkh1O/N"
  123.   File Retention = 60 days           # 60 days
  124.   Job Retention = 6 months           # six months
  125.   AutoPrune = yes                    # Prune expired Jobs/Files
  126. }
  127.  
  128.  
  129. # Definition of file Virtual Autochanger device
  130. Storage {
  131.   Name = node3-sd
  132.   Address = 127.0.0.1             # N.B. Use a fully qualified name here
  133.   SDPort = 9103
  134.   Password = "W7MaQtFIK93RooiQO5JgM3kThDURwEDTg9pTe+YHvSEi"
  135.   Device = FileChgr1
  136.   Media Type = File1
  137.   Maximum Concurrent Jobs = 10        # run up to 10 jobs a the same time
  138. }
  139.  
  140. ###################################################client and storage for backup 结束#############################################
  141.  
  142. # Generic catalog service
  143. Catalog {
  144.   Name = MyCatalog
  145.   dbname = "bacula"; dbuser = "root"; dbpassword = "123456"
  146. }
  147.  
  148. Messages {
  149.   Name = Standard
  150.   mailcommand = "/etc/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  151.   operatorcommand = "/etc/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  152.   mail = yangvipguang@126.com = all, !skipped
  153.   operator = yangvipguang@126.com = mount
  154.   console = all, !skipped, !saved
  155.   append = "/opt/bacula/log/bacula.log" = all, !skipped
  156.   catalog = all
  157. }
  158.  
  159. # Message delivery for daemon messages (no job).
  160. Messages {
  161.   Name = Daemon
  162.   mailcommand = "/etc/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  163.   mail = yangvipguang@126.com = all, !skipped
  164.   console = all, !skipped, !saved
  165.   append = "/opt/bacula/log/bacula.log" = all, !skipped
  166. }
  167.  
  168. # Default pool definition
  169. Pool {
  170.   Name = Default
  171.   Pool Type = Backup
  172.   Recycle = yes                       # Bacula can automatically recycle Volumes
  173.   AutoPrune = yes                     # Prune expired volumes
  174.   Volume Retention = 365 days         # one year
  175.   Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  176.   Maximum Volumes = 100               # Limit number of Volumes in Pool
  177. }
  178.  
  179. # File Pool definition
  180. Pool {
  181.   Name = File
  182.   Pool Type = Backup
  183.   Recycle = yes                       # Bacula can automatically recycle Volumes
  184.   AutoPrune = yes                     # Prune expired volumes
  185.   Volume Retention = 365 days         # one year
  186.   Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  187.   Maximum Volumes = 100               # Limit number of Volumes in Pool
  188.   Label Format = "Vol-"               # Auto label
  189. }
  190.  
  191.  
  192. # Scratch pool definition
  193. Pool {
  194.   Name = Scratch
  195.   Pool Type = Backup
  196. }
  197.  
  198. #
  199. # Restricted console used by tray-monitor to get the status of the director
  200. #
  201. Console {
  202.   Name = node3-mon
  203.   Password = "p1xpiAIBT8RR4s1EPbG/ijpV/43y7DkHiHboFYYTbjqi"
  204.   CommandACL = status, .status
  205. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top