future_shock

bacula-dir

May 30th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.88 KB | None | 0 0
  1. # Default Bacula Director Configuration file
  2. #
  3. # The only thing that MUST be changed is to add one or more
  4. # file or directory names in the Include directive of the
  5. # FileSet resource.
  6. #
  7. # For Bacula release 7.4.4 (20 September 2016) -- redhat Four)
  8. #
  9. # You might also want to change the default email address
  10. # from root to your address. See the "mail" and "operator"
  11. # directives in the Messages resource.
  12. #
  13. # Copyright (C) 2000-2015 Kern Sibbald
  14. # License: BSD 2-Clause; see file LICENSE-FOSS
  15. #
  16.  
  17. Director { # define myself
  18. Name = bacula-dir
  19. DIRport = 9101 # where we listen for UA connections
  20. QueryFile = "/etc/bacula/query.sql"
  21. WorkingDirectory = "/var/spool/bacula"
  22. PidDirectory = "/var/run"
  23. Maximum Concurrent Jobs = 20
  24. Password = "report" # Console password
  25. Messages = Daemon
  26. DirAddress = 127.0.0.1
  27. }
  28.  
  29. JobDefs {
  30. Name = "DefaultJob"
  31. Type = Backup
  32. Level = Incremental
  33. Client = bacula-fd
  34. FileSet = "Full Set"
  35. Schedule = "CicloSemanal"
  36. Storage = pmfmsrv08-sd
  37. Messages = Standard
  38. Pool = Pool1
  39. SpoolAttributes = yes
  40. Priority = 10
  41. Write Bootstrap = "/var/spool/bacula/%c.bsr"
  42. }
  43.  
  44.  
  45. #
  46. # Define the main nightly save backup job
  47. # By default, this job will back up to disk in /tmp
  48. Job {
  49. Name = "Bacula_Local_Backup"
  50. JobDefs = "DefaultJob"
  51. }
  52.  
  53. #Job {
  54. # Name = "BackupClient2"
  55. # Client = bacula2-fd
  56. # JobDefs = "DefaultJob"
  57. #}
  58.  
  59. #Job {
  60. # Name = "BackupClient1-to-Tape"
  61. # JobDefs = "DefaultJob"
  62. # Storage = LTO-4
  63. # Spool Data = yes # Avoid shoe-shine
  64. # Pool = Default
  65. #}
  66.  
  67. #}
  68.  
  69. # Backup the catalog database (after the nightly save)
  70. Job {
  71. Name = "BackupCatalog"
  72. JobDefs = "DefaultJob"
  73. Level = Full
  74. FileSet="Catalog"
  75. Schedule = "WeeklyCycleAfterBackup"
  76. # This creates an ASCII copy of the catalog
  77. # Arguments to make_catalog_backup.pl are:
  78. # make_catalog_backup.pl <catalog-name>
  79. RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"
  80. # This deletes the copy of the catalog
  81. RunAfterJob = "/usr/libexec/bacula/delete_catalog_backup"
  82. Write Bootstrap = "/var/spool/bacula/%n.bsr"
  83. Priority = 11 # run after main backup
  84. }
  85.  
  86. #
  87. # Standard Restore template, to be changed by Console program
  88. # Only one such job is needed for all Jobs/Clients/Storage ...
  89. #
  90. Job {
  91. Name = "Bacula_Local_Restore"
  92. Type = Restore
  93. Client=bacula-fd
  94. FileSet="Full Set"
  95. Storage = pmfmsrv08-sd
  96. Pool = Pool1
  97. Messages = Standard
  98. Where = /media/hd1/bacula/restore
  99. }
  100.  
  101. ##Meus jobs:
  102.  
  103. Job {
  104. Name = "Backup Programas"
  105. Type = backup
  106. Client=bacula-fd
  107. FileSet="Programas"
  108. Storage = pmfmsrv08-sd
  109. Schedule = "CicloSemanal"
  110. Pool = Pool1
  111. Messages = Standard
  112.  
  113. }
  114.  
  115. Job {
  116. Name = "Backup Servidor Cecam"
  117. Type = backup
  118. Client=pmfmsrv01-fd
  119. FileSet="pmfmsrv01-fs"
  120. Storage = pmfmsrv08-sd
  121. Schedule = "CicloSemanal"
  122. Pool = Pool1
  123. Messages = Standard
  124.  
  125. }
  126.  
  127.  
  128. # List of files to be backed up
  129. FileSet {
  130. Name = "Full Set"
  131. Include {
  132. Options {
  133. signature = MD5
  134. compression = gzip
  135. }
  136. #
  137. # Put your list of files here, preceded by 'File =', one per line
  138. # or include an external list with:
  139. #
  140. # File = <file-name
  141. #
  142. # Note: / backs up everything on the root partition.
  143. # if you have other partitions such as /usr or /home
  144. # you will probably want to add them too.
  145. #
  146. # By default this is defined to point to the Bacula binary
  147. # directory to give a reasonable FileSet to backup to
  148. # disk storage during initial testing.
  149. #
  150. File = /media/hd3/backup/
  151. File = /media/hd2/backup/
  152. }
  153.  
  154. #
  155. # If you backup the root directory, the following two excluded
  156. # files can be useful
  157. #
  158. Exclude {
  159. File = /.journal
  160. File = /.fsck
  161. File = /*~
  162. File = /.tmp
  163. }
  164. }
  165.  
  166. ##Meus File Sets
  167.  
  168. #Diretório "backup" do 55:
  169. FileSet {
  170. Name = "Programas"
  171. Include {
  172. Options {
  173. signature = MD5
  174. compression = gzip
  175. }
  176. File = /backup/programas
  177. }
  178. }
  179.  
  180. #Servidor da Cecam(pmfmsrv01[65])
  181. FileSet {
  182. Name = "pmfmsrv01-fs"
  183. Include {
  184. Options {
  185. signature = MD5
  186. compression = gzip
  187. }
  188. File = C:/backup/
  189. File = C:/CECAM/
  190. }
  191. }
  192.  
  193.  
  194.  
  195. #
  196. # When to do the backups, full backup on first sunday of the month,
  197. # differential (i.e. incremental since full) every other sunday,
  198. # and incremental backups other days
  199. Schedule {
  200. Name = "WeeklyCycle"
  201. Run = Full 1st sun at 23:05
  202. Run = Differential 2nd-5th sun at 23:05
  203. Run = Incremental mon-sat at 23:05
  204. }
  205.  
  206. # This schedule does the catalog. It starts after the WeeklyCycle
  207. Schedule {
  208. Name = "WeeklyCycleAfterBackup"
  209. Run = Full sun-sat at 23:10
  210. }
  211.  
  212. ##Meus Schedules
  213. Schedule {
  214. Name = "CicloSemanal"
  215. Run = Full sun at 23:05
  216. Run = Incremental mon-sat at 23:05
  217. }
  218.  
  219. # This is the backup of the catalog
  220. FileSet {
  221. Name = "Catalog"
  222. Include {
  223. Options {
  224. signature = MD5
  225. }
  226. File = "/var/spool/bacula/bacula.sql"
  227. }
  228. }
  229.  
  230. # Client (File Services) to backup
  231. Client {
  232. Name = bacula-fd
  233. Address = localhost
  234. FDPort = 9102
  235. Catalog = MyCatalog
  236. Password = "report" # password for FileDaemon
  237. File Retention = 7 days # 60 days
  238. Job Retention = 7 days # six months
  239. AutoPrune = yes # Prune expired Jobs/Files
  240. }
  241.  
  242. ## Meus Clientes
  243.  
  244. # Client (File Services) to backup
  245.  
  246. Client {
  247. Name = pmfmsrv01-fd
  248. Address = 192.168.1.65
  249. FDPort = 9102
  250. Catalog = MyCatalog
  251. Password = "report"
  252. File Retention = 7 days
  253. Job Retention = 7 days
  254. AutoPrune = yes
  255. }
  256.  
  257. Client {
  258. Name = pmfmsrv08-fd
  259. Address = 192.168.1.60
  260. FDPort = 9102
  261. Catalog = MyCatalog
  262. Password = "report"
  263. File Retention = 7 days
  264. Job Retention = 7 days
  265. AutoPrune = yes
  266. }
  267.  
  268.  
  269. #
  270. # Second Client (File Services) to backup
  271. # You should change Name, Address, and Password before using
  272. #
  273. #Client {
  274. # Name = bacula2-fd
  275. # Address = localhost2
  276. # FDPort = 9102
  277. # Catalog = MyCatalog
  278. # Password = "@@FD_PASSWORD@@2" # password for FileDaemon 2
  279. # File Retention = 60 days # 60 days
  280. # Job Retention = 6 months # six months
  281. # AutoPrune = yes # Prune expired Jobs/Files
  282. #}
  283.  
  284.  
  285. # Definition of file Virtual Autochanger device
  286. Storage {
  287. Name = pmfmsrv08-sd
  288. Address = 192.168.1.60 # N.B. Use a fully qualified name here
  289. SDPort = 9103
  290. Password = "report"
  291. Device = Trocador1
  292. Media Type = File1
  293. Maximum Concurrent Jobs = 20 # run up to 10 jobs a the same time
  294. }
  295.  
  296. # Definition of a second file Virtual Autochanger device
  297. # Possibly pointing to a different disk drive
  298.  
  299. #Storage {
  300. # Name = Storage2
  301. # Address = 192.168.1.60 # N.B. Use a fully qualified name here
  302. # SDPort = 9103
  303. # Password = "report"
  304. # Device = Trocador2
  305. # Media Type = File2
  306. # Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
  307. #}
  308.  
  309. # Definition of LTO-4 tape Autochanger device
  310. #Storage {
  311. # Name = LTO-4
  312. # Do not use "localhost" here
  313. # Address = localhost # N.B. Use a fully qualified name here
  314. # SDPort = 9103
  315. # Password = "@@SD_PASSWORD@@" # password for Storage daemon
  316. # Device = LTO-4 # must be same as Device in Storage daemon
  317. # Media Type = LTO-4 # must be same as MediaType in Storage daemon
  318. # Maximum Concurrent Jobs = 10
  319. #}
  320.  
  321. # Generic catalog service
  322. Catalog {
  323. Name = MyCatalog
  324. dbname = "bacula"; dbuser = "bacula"; dbpassword = "bacula"
  325. }
  326.  
  327. # Reasonable message delivery -- send most everything to email address
  328. # and to the console
  329. Messages {
  330. Name = Standard
  331. #
  332. # NOTE! If you send to two email or more email addresses, you will need
  333. # to replace the %r in the from field (-f part) with a single valid
  334. # email address in both the mailcommand and the operatorcommand.
  335. # What this does is, it sets the email address that emails would display
  336. # in the FROM field, which is by default the same email as they're being
  337. # sent to. However, if you send email to more than one address, then
  338. # you'll have to set the FROM address manually, to a single address.
  339. # for example, a 'no-reply@mydomain.com', is better since that tends to
  340. # tell (most) people that its coming from an automated source.
  341.  
  342. #
  343. mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  344. operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  345. mail = root@localhost = all, !skipped
  346. operator = root@localhost = mount
  347. console = all, !skipped, !saved
  348. #
  349. # WARNING! the following will create a file that you must cycle from
  350. # time to time as it will grow indefinitely. However, it will
  351. # also keep all your messages if they scroll off the console.
  352. #
  353. append = "/var/log/bacula/bacula.log" = all, !skipped
  354. catalog = all
  355. }
  356.  
  357.  
  358. #
  359. # Message delivery for daemon messages (no job).
  360. Messages {
  361. Name = Daemon
  362. mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  363. mail = root@localhost = all, !skipped
  364. console = all, !skipped, !saved
  365. append = "/var/log/bacula/bacula.log" = all, !skipped
  366. }
  367.  
  368. # Default pool definition
  369. Pool {
  370. Name = Default
  371. Pool Type = Backup
  372. Recycle = yes # Bacula can automatically recycle Volumes
  373. AutoPrune = yes # Prune expired volumes
  374. Volume Retention = 60 days # one year
  375. Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
  376. Maximum Volumes = 100 # Limit number of Volumes in Pool
  377. }
  378.  
  379. # File Pool definition
  380. Pool {
  381. Name = Pool1
  382. Pool Type = Backup
  383. Recycle = yes # Bacula can automatically recycle Volumes
  384. AutoPrune = yes # Prune expired volumes
  385. Volume Retention = 12 hours # one year
  386. Maximum Volume Bytes = 20G # Limit Volume size to something reasonable
  387. Maximum Volumes = 20 # Limit number of Volumes in Pool
  388. Label Format = "Bkp-" # Auto label
  389. Purge Oldest Volume = yes
  390. Recycle Oldest Volume = yes
  391. Action On Purge = Truncate
  392.  
  393. }
  394.  
  395.  
  396. # Scratch pool definition
  397. Pool {
  398. Name = Scratch
  399. Pool Type = Backup
  400. }
  401.  
  402. #
  403. # Restricted console used by tray-monitor to get the status of the director
  404. #
  405. Console {
  406. Name = bacula-mon
  407. Password = "report"
  408. CommandACL = status, .status
  409. }
Add Comment
Please, Sign In to add comment