Advertisement
Guest User

bacula-dir.conf

a guest
Nov 10th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 9.18 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 5.2.6 (21 February 2012) -- ubuntu 14.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 = backup-sam-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 = 1
  22.   Password = "APgA4jNxGbMVsp_58oVUBZ-WQS_s_MDsn"         # Console password
  23.   Messages = Daemon
  24.   DirAddress = 127.0.0.1
  25. }
  26.  
  27. JobDefs {
  28.   Name = "DefaultJob"
  29.   Type = Backup
  30.   Level = Incremental
  31.   Client = backup-sam-fd
  32.   FileSet = "Full Set"
  33.   Schedule = "WeeklyCycle"
  34.   Storage = File
  35.   Messages = Standard
  36.   Pool = File
  37.   Priority = 10
  38.   Write Bootstrap = "/var/lib/bacula/%c.bsr"
  39. }
  40.  
  41.  
  42. #
  43. # Define the main nightly save backup job
  44. #   By default, this job will back up to disk in /nonexistant/path/to/file/archive/dir
  45. Job {
  46.   Name = "BackupLocalFiles"
  47.   JobDefs = "DefaultJob"
  48. }
  49.  
  50. #Job {
  51. #  Name = "BackupClient2"
  52. #  Client = backup-sam2-fd
  53. #  JobDefs = "DefaultJob"
  54. #}
  55.  
  56. # Backup the catalog database (after the nightly save)
  57. Job {
  58.   Name = "BackupCatalog"
  59.   JobDefs = "DefaultJob"
  60.   Level = Full
  61.   FileSet="Catalog"
  62.   Schedule = "WeeklyCycleAfterBackup"
  63.   # This creates an ASCII copy of the catalog
  64.   # Arguments to make_catalog_backup.pl are:
  65.   #  make_catalog_backup.pl <catalog-name>
  66.   RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
  67.   # This deletes the copy of the catalog
  68.   RunAfterJob  = "/etc/bacula/scripts/delete_catalog_backup"
  69.   Write Bootstrap = "/var/lib/bacula/%n.bsr"
  70.   Priority = 11                   # run after main backup
  71. }
  72.  
  73. #
  74. # Standard Restore template, to be changed by Console program
  75. #  Only one such job is needed for all Jobs/Clients/Storage ...
  76. #
  77. Job {
  78.   Name = "RestoreLocalFiles"
  79.   Type = Restore
  80.   Client=backup-sam-fd
  81.   FileSet="Full Set"                  
  82.   Storage = File                      
  83.   Pool = Default
  84.   Messages = Standard
  85.   Where = /mnt/bacula/restore
  86. }
  87.  
  88.  
  89. # List of files to be backed up
  90. FileSet {
  91.   Name = "Full Set"
  92.   Include {
  93.     Options {
  94.       signature = MD5
  95.       compression = GZIP
  96.     }
  97. #    
  98. #  Put your list of files here, preceded by 'File =', one per line
  99. #    or include an external list with:
  100. #
  101. #    File = <file-name
  102. #
  103. #  Note: / backs up everything on the root partition.
  104. #    if you have other partitions such as /usr or /home
  105. #    you will probably want to add them too.
  106. #
  107. #  By default this is defined to point to the Bacula binary
  108. #    directory to give a reasonable FileSet to backup to
  109. #    disk storage during initial testing.
  110. #
  111.     File = /
  112.   }
  113.  
  114. #
  115. # If you backup the root directory, the following two excluded
  116. #   files can be useful
  117. #
  118.   Exclude {
  119.     File = /var/lib/bacula
  120.     File = /mnt/bacula
  121.     File = /proc
  122.     File = /tmp
  123.     File = /.journal
  124.     File = /.fsck
  125.   }
  126. }
  127.  
  128. #
  129. # When to do the backups, full backup on first sunday of the month,
  130. #  differential (i.e. incremental since full) every other sunday,
  131. #  and incremental backups other days
  132. Schedule {
  133.   Name = "WeeklyCycle"
  134.   Run = Full 1st sun at 23:05
  135.   Run = Differential 2nd-5th sun at 23:05
  136.   Run = Incremental mon-sat at 23:05
  137. }
  138.  
  139. # This schedule does the catalog. It starts after the WeeklyCycle
  140. Schedule {
  141.   Name = "WeeklyCycleAfterBackup"
  142.   Run = Full sun-sat at 23:10
  143. }
  144.  
  145. # This is the backup of the catalog
  146. FileSet {
  147.   Name = "Catalog"
  148.   Include {
  149.     Options {
  150.       signature = MD5
  151.     }
  152.     File = "/var/lib/bacula/bacula.sql"
  153.   }
  154. }
  155.  
  156. # Client (File Services) to backup
  157. Client {
  158.   Name = backup-sam-fd
  159.   Address = localhost
  160.   FDPort = 9102
  161.   Catalog = MyCatalog
  162.   Password = "r_UEX_49dJUr_Dptn9aI7_9x9a5dPG5yS"          # password for FileDaemon
  163.   File Retention = 30 days            # 30 days
  164.   Job Retention = 6 months            # six months
  165.   AutoPrune = yes                     # Prune expired Jobs/Files
  166. }
  167.  
  168. #
  169. # Second Client (File Services) to backup
  170. #  You should change Name, Address, and Password before using
  171. #
  172. #Client {
  173. #  Name = backup-sam2-fd
  174. #  Address = localhost2
  175. #  FDPort = 9102
  176. #  Catalog = MyCatalog
  177. #  Password = "r_UEX_49dJUr_Dptn9aI7_9x9a5dPG5yS2"         # password for FileDaemon 2
  178. #  File Retention = 30 days            # 30 days
  179. #  Job Retention = 6 months            # six months
  180. #  AutoPrune = yes                     # Prune expired Jobs/Files
  181. #}
  182.  
  183.  
  184. # Definition of file storage device
  185. Storage {
  186.   Name = File
  187. # Do not use "localhost" here    
  188.   Address = backup-sam.openstacklocal                # N.B. Use a fully qualified name here
  189.   SDPort = 9103
  190.   Password = "tL3-S6OfmJhkT6CGN9axDWm-64uc18oko"
  191.   Device = FileStorage
  192.   Media Type = File
  193. }
  194.  
  195.  
  196.  
  197. # Definition of DDS tape storage device
  198. #Storage {
  199. #  Name = DDS-4    
  200. #  Do not use "localhost" here
  201. #  Address = localhost                # N.B. Use a fully qualified name here
  202. #  SDPort = 9103
  203. #  Password = "tL3-S6OfmJhkT6CGN9axDWm-64uc18oko"          # password for Storage daemon
  204. #  Device = DDS-4                      # must be same as Device in Storage daemon
  205. #  Media Type = DDS-4                  # must be same as MediaType in Storage daemon
  206. #  Autochanger = yes                   # enable for autochanger device
  207. #}
  208.  
  209. # Definition of 8mm tape storage device
  210. #Storage {
  211. #  Name = "8mmDrive"
  212. #  Do not use "localhost" here
  213. #  Address = localhost                # N.B. Use a fully qualified name here
  214. #  SDPort = 9103
  215. #  Password = "tL3-S6OfmJhkT6CGN9axDWm-64uc18oko"
  216. #  Device = "Exabyte 8mm"
  217. #  MediaType = "8mm"
  218. #}
  219.  
  220. # Definition of DVD storage device
  221. #Storage {
  222. #  Name = "DVD"
  223. #  Do not use "localhost" here
  224. #  Address = localhost                # N.B. Use a fully qualified name here
  225. #  SDPort = 9103
  226. #  Password = "tL3-S6OfmJhkT6CGN9axDWm-64uc18oko"
  227. #  Device = "DVD Writer"
  228. #  MediaType = "DVD"
  229. #}
  230.  
  231.  
  232. # Generic catalog service
  233. Catalog {
  234.   Name = MyCatalog
  235. # Uncomment the following line if you want the dbi driver
  236. # dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =  
  237.   dbname = "bacula"; DB Address = ""; dbuser = "bacula"; dbpassword = "backup"
  238. }
  239.  
  240. # Reasonable message delivery -- send most everything to email address
  241. #  and to the console
  242. Messages {
  243.   Name = Standard
  244. #
  245. # NOTE! If you send to two email or more email addresses, you will need
  246. #  to replace the %r in the from field (-f part) with a single valid
  247. #  email address in both the mailcommand and the operatorcommand.
  248. #  What this does is, it sets the email address that emails would display
  249. #  in the FROM field, which is by default the same email as they're being
  250. #  sent to.  However, if you send email to more than one address, then
  251. #  you'll have to set the FROM address manually, to a single address.
  252. #  for example, a 'no-reply@mydomain.com', is better since that tends to
  253. #  tell (most) people that its coming from an automated source.
  254.  
  255. #
  256.   mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  257.   operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  258.   mail = root = all, !skipped            
  259.   operator = root = mount
  260.   console = all, !skipped, !saved
  261. #
  262. # WARNING! the following will create a file that you must cycle from
  263. #          time to time as it will grow indefinitely. However, it will
  264. #          also keep all your messages if they scroll off the console.
  265. #
  266.   append = "/var/log/bacula/bacula.log" = all, !skipped
  267.   catalog = all
  268. }
  269.  
  270.  
  271. #
  272. # Message delivery for daemon messages (no job).
  273. Messages {
  274.   Name = Daemon
  275.   mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  276.   mail = root = all, !skipped            
  277.   console = all, !skipped, !saved
  278.   append = "/var/log/bacula/bacula.log" = all, !skipped
  279. }
  280.  
  281. # Default pool definition
  282. Pool {
  283.   Name = Default
  284.   Pool Type = Backup
  285.   Recycle = yes                       # Bacula can automatically recycle Volumes
  286.   AutoPrune = yes                     # Prune expired volumes
  287.   Volume Retention = 365 days         # one year
  288. }
  289.  
  290. # File Pool definition
  291. Pool {
  292.   Name = File
  293.   Pool Type = Backup
  294.   Label Format = Local-
  295.   Recycle = yes                       # Bacula can automatically recycle Volumes
  296.   AutoPrune = yes                     # Prune expired volumes
  297.   Volume Retention = 365 days         # one year
  298.   Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  299.   Maximum Volumes = 100               # Limit number of Volumes in Pool
  300. }
  301.  
  302.  
  303. # Scratch pool definition
  304. Pool {
  305.   Name = Scratch
  306.   Pool Type = Backup
  307. }
  308.  
  309. #
  310. # Restricted console used by tray-monitor to get the status of the director
  311. #
  312. Console {
  313.   Name = backup-sam-mon
  314.   Password = "ejVfZWlfItwH5nHWeDJrWrAPusY16v81a"
  315.   CommandACL = status, .status
  316. }
  317.  
  318. @|"find /etc/bacula/conf.d -name '*.conf' -type f -exec echo @{} \;"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement