Guest User

Untitled

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