Advertisement
Guest User

Untitled

a guest
May 31st, 2017
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.58 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.0.1 (24 February 2010) -- ubuntu 10.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 = nakuru-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 = "-removed-" # 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 = nakuru-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 = "BackupClient1"
  47. JobDefs = "DefaultJob"
  48. }
  49.  
  50. #Job {
  51. # Name = "BackupClient2"
  52. # Client = nakuru2-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 = "RestoreFiles"
  79. Type = Restore
  80. Client=nakuru-fd
  81. FileSet="Full Set"
  82. Storage = File
  83. Pool = Default
  84. Messages = Standard
  85. Where = /bacula-restores
  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. }
  96. #
  97. # Put your list of files here, preceded by 'File =', one per line
  98. # or include an external list with:
  99. #
  100. # File = <file-name
  101. #
  102. # Note: / backs up everything on the root partition.
  103. # if you have other partitions such as /usr or /home
  104. # you will probably want to add them too.
  105. #
  106. # By default this is defined to point to the Bacula binary
  107. # directory to give a reasonable FileSet to backup to
  108. # disk storage during initial testing.
  109. #
  110. File = /usr/sbin
  111. File = /etc
  112. File = /home
  113. File = /var/log
  114. File = /usr/local
  115. }
  116.  
  117. #
  118. # If you backup the root directory, the following two excluded
  119. # files can be useful
  120. #
  121. Exclude {
  122. File = /var/lib/bacula
  123. File = /nonexistant/path/to/file/archive/dir
  124. File = /proc
  125. File = /tmp
  126. File = /.journal
  127. File = /.fsck
  128. File = /backups_diaris
  129. File = /backup_usb
  130. File = /bacula_restores
  131. File = /nobackup
  132. }
  133. }
  134.  
  135. #
  136. # When to do the backups, full backup on first sunday of the month,
  137. # differential (i.e. incremental since full) every other sunday,
  138. # and incremental backups other days
  139. Schedule {
  140. Name = "WeeklyCycle"
  141. Run = Full 1st sun at 23:05
  142. Run = Differential 2nd-5th sun at 23:05
  143. Run = Incremental mon-sat at 23:05
  144. }
  145.  
  146. # This schedule does the catalog. It starts after the WeeklyCycle
  147. Schedule {
  148. Name = "WeeklyCycleAfterBackup"
  149. Run = Full sun-sat at 23:10
  150. }
  151.  
  152. # This is the backup of the catalog
  153. FileSet {
  154. Name = "Catalog"
  155. Include {
  156. Options {
  157. signature = MD5
  158. }
  159. File = "/var/lib/bacula/bacula.sql"
  160. }
  161. }
  162.  
  163. # Client (File Services) to backup
  164. Client {
  165. Name = nakuru-fd
  166. Address = localhost
  167. FDPort = 9102
  168. Catalog = MyCatalog
  169. Password = "-removed-" # password for FileDaemon
  170. File Retention = 30 days # 30 days
  171. Job Retention = 6 months # six months
  172. AutoPrune = yes # Prune expired Jobs/Files
  173. }
  174.  
  175.  
  176. # Definition of file storage device
  177. Storage {
  178. Name = File
  179. # Do not use "localhost" here
  180. Address = localhost # N.B. Use a fully qualified name here
  181. SDPort = 9103
  182. Password = "-removed-"
  183. Device = FileStorage
  184. Media Type = File
  185. }
  186.  
  187.  
  188. # Generic catalog service
  189. Catalog {
  190. Name = MyCatalog
  191. # Uncomment the following line if you want the dbi driver
  192. # dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport =
  193. dbname = bacula; DB Address = ""; dbuser = "bacula"; dbpassword = "-removed-"
  194. }
  195.  
  196. # Reasonable message delivery -- send most everything to email address
  197. # and to the console
  198. Messages {
  199. Name = Standard
  200. #
  201. # NOTE! If you send to two email or more email addresses, you will need
  202. # to replace the %r in the from field (-f part) with a single valid
  203. # email address in both the mailcommand and the operatorcommand.
  204. # What this does is, it sets the email address that emails would display
  205. # in the FROM field, which is by default the same email as they're being
  206. # sent to. However, if you send email to more than one address, then
  207. # you'll have to set the FROM address manually, to a single address.
  208. # for example, a 'no-reply@mydomain.com', is better since that tends to
  209. # tell (most) people that its coming from an automated source.
  210.  
  211. #
  212. mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  213. operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  214. mail = jordi@auge.cat = all, !skipped
  215. operator = jordi@auge.cat = mount
  216. console = all, !skipped, !saved
  217. #
  218. # WARNING! the following will create a file that you must cycle from
  219. # time to time as it will grow indefinitely. However, it will
  220. # also keep all your messages if they scroll off the console.
  221. #
  222. append = "/var/lib/bacula/log" = all, !skipped
  223. catalog = all
  224. }
  225.  
  226.  
  227. #
  228. # Message delivery for daemon messages (no job).
  229. Messages {
  230. Name = Daemon
  231. mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  232. mail = jordi@auge.cat = all, !skipped
  233. console = all, !skipped, !saved
  234. append = "/var/lib/bacula/log" = all, !skipped
  235. }
  236.  
  237. # Default pool definition
  238. Pool {
  239. Name = Default
  240. Pool Type = Backup
  241. Recycle = yes # Bacula can automatically recycle Volumes
  242. AutoPrune = yes # Prune expired volumes
  243. Volume Retention = 30 days # one month
  244. }
  245.  
  246. # File Pool definition
  247. Pool {
  248. Name = File
  249. Pool Type = Backup
  250. Recycle = yes # Bacula can automatically recycle Volumes
  251. AutoPrune = yes # Prune expired volumes
  252. Volume Retention = 30 days # one month
  253. Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
  254. Maximum Volumes = 100 # Limit number of Volumes in Pool
  255. }
  256.  
  257.  
  258. # Scratch pool definition
  259. Pool {
  260. Name = Scratch
  261. Pool Type = Backup
  262. }
  263.  
  264. #
  265. # Restricted console used by tray-monitor to get the status of the director
  266. #
  267. Console {
  268. Name = nakuru-mon
  269. Password = "-removed-"
  270. CommandACL = status, .status
  271. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement