bacula-dir.conf 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  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.5 (26 January 2012) -- ubuntu 12.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. Director { # define myself
  15. Name = lto-director
  16. DIRport = 9101 # where we listen for UA connections
  17. QueryFile = "/etc/bacula/scripts/query.sql"
  18. WorkingDirectory = "/var/lib/bacula"
  19. PidDirectory = "/var/run/bacula"
  20. Maximum Concurrent Jobs = 1
  21. Password = "vOchjaYxGgFnKdbE5me5a3Tp5vs763FyoIhXdqUF733A" # Console password
  22. Messages = Daemon
  23. #DirAddress = 127.0.0.1
  24. DirAddress = 10.0.21.4
  25. }
  26. JobDefs {
  27. Name = "RAIDToTape"
  28. Type = Backup
  29. Level = Full
  30. Client = raid-fd
  31. FileSet = "share-work"
  32. Schedule = "Manual"
  33. Storage = TapeDrive
  34. Messages = Standard
  35. Pool = Tape
  36. Priority = 10
  37. Write Bootstrap = "/var/lib/bacula/bootstrap/%c.bsr"
  38. }
  39. JobDefs {
  40. Name = "CatalogeToTape"
  41. Type = Backup
  42. Level = Full
  43. Client = lto-fd
  44. FileSet = "Catalog"
  45. Schedule = "Manual"
  46. Storage = TapeDrive
  47. Messages = Standard
  48. Pool = Tape
  49. Priority = 10
  50. Write Bootstrap = "/var/lib/bacula/bootstrap/%c.bsr"
  51. }
  52. JobDefs {
  53. Name = "BackupToDisk"
  54. Type = Backup
  55. Level = Full
  56. Client = lto-fd
  57. FileSet = "share-work"
  58. Schedule = "Manual"
  59. Storage = File
  60. Messages = Standard
  61. Pool = File
  62. Priority = 10
  63. Write Bootstrap = "/var/lib/bacula/bootstrap/%c.bsr"
  64. }
  65. #
  66. # Define the main nightly save backup job
  67. # By default, this job will back up to disk in /nonexistant/path/to/file/archive/dir
  68. Job {
  69. Name = "RAID Backup"
  70. JobDefs = "RAIDToTape"
  71. Level = Full
  72. FileSet="share-work"
  73. Schedule = "Manual"
  74. # This creates an ASCII copy of the catalog
  75. # Arguments to make_catalog_backup.pl are:
  76. # make_catalog_backup.pl <catalog-name>
  77. RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
  78. # This deletes the copy of the catalog
  79. #RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup"
  80. RunAfterJob = "/usr/local/bin/eject_tape"
  81. Write Bootstrap = "/var/lib/bacula/%n.bsr"
  82. Priority = 1 # run after main backup
  83. }
  84. #Job {
  85. # Name = "BackupClient2"
  86. # Client = lto2-fd
  87. # JobDefs = "DefaultJob"
  88. #}
  89. # Backup the catalog database (after the nightly save)
  90. Job {
  91. Name = "BackupCatalog"
  92. JobDefs = "BackupToDisk"
  93. Level = Full
  94. FileSet="Catalog"
  95. Schedule = "Manual"
  96. # This creates an ASCII copy of the catalog
  97. # Arguments to make_catalog_backup.pl are:
  98. # make_catalog_backup.pl <catalog-name>
  99. RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
  100. # This deletes the copy of the catalog
  101. RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup"
  102. Write Bootstrap = "/var/lib/bacula/%n.bsr"
  103. Priority = 11 # run after main backup
  104. }
  105. #
  106. # Standard Restore template, to be changed by Console program
  107. # Only one such job is needed for all Jobs/Clients/Storage ...
  108. #
  109. Job {
  110. Name = "RestoreFiles"
  111. Type = Restore
  112. Client=lto-fd
  113. FileSet="share-work"
  114. Storage = File
  115. Pool = Tape
  116. Messages = Standard
  117. Where = /storage/bacula/restore
  118. RunAfterJob = "/bin/chown -R proav:proav /storage/bacula/restore/"
  119. }
  120. # List of files to be backed up
  121. FileSet {
  122. Name = "share-work"
  123. Include {
  124. Options {
  125. signature = MD5
  126. #compression=LZO
  127. #compression=GZIP
  128. }
  129. #File = /storage/backup/
  130. File = /storage/share/
  131. # Backup Bacula Catalog with each run
  132. File = "/var/lib/bacula/bacula.sql"
  133. }
  134. Exclude {
  135. File = /proc
  136. File = /.journal
  137. File = /.fsck
  138. File = /.DS_Store
  139. }
  140. }
  141. # List of files to be backed up
  142. FileSet {
  143. Name = "WORK"
  144. Include {
  145. Options { signature = MD5 }
  146. File = /storage/share/WORK/
  147. }
  148. }
  149. FileSet {
  150. Name = "PART01"
  151. Include {
  152. Options { signature = MD5 }
  153. File = /storage/share/PART01/
  154. }
  155. }
  156. FileSet {
  157. Name = "PART02"
  158. Include {
  159. Options { signature = MD5 }
  160. File = /storage/share/PART02/
  161. }
  162. }
  163. FileSet {
  164. Name = "PART03"
  165. Include {
  166. Options { signature = MD5 }
  167. File = /storage/share/PART03/
  168. }
  169. }
  170. FileSet {
  171. Name = "PART04"
  172. Include {
  173. Options { signature = MD5 }
  174. File = /storage/share/PART04/
  175. }
  176. }
  177. FileSet {
  178. Name = "PART05"
  179. Include {
  180. Options { signature = MD5 }
  181. File = /storage/share/PART05/
  182. }
  183. }
  184. FileSet {
  185. Name = "PART06"
  186. Include {
  187. Options { signature = MD5 }
  188. File = /storage/share/PART06/
  189. }
  190. }
  191. FileSet {
  192. Name = "PART07"
  193. Include {
  194. Options { signature = MD5 }
  195. File = /storage/share/PART07/
  196. }
  197. }
  198. FileSet {
  199. Name = "PART08"
  200. Include {
  201. Options { signature = MD5 }
  202. File = /storage/share/PART08/
  203. }
  204. }
  205. FileSet {
  206. Name = "PART09"
  207. Include {
  208. Options { signature = MD5 }
  209. File = /storage/share/PART09/
  210. }
  211. }
  212. FileSet {
  213. Name = "PART10"
  214. Include {
  215. Options { signature = MD5 }
  216. File = /storage/share/PART10/
  217. }
  218. }
  219. FileSet {
  220. Name = "PART11"
  221. Include {
  222. Options { signature = MD5 }
  223. File = /storage/share/PART11/
  224. }
  225. }
  226. FileSet {
  227. Name = "PART12"
  228. Include {
  229. Options { signature = MD5 }
  230. File = /storage/share/PART12/
  231. }
  232. }
  233. FileSet {
  234. Name = "PART13"
  235. Include {
  236. Options { signature = MD5 }
  237. File = /storage/share/PART13/
  238. }
  239. }
  240. FileSet {
  241. Name = "PART14"
  242. Include {
  243. Options { signature = MD5 }
  244. File = /storage/share/PART14/
  245. }
  246. }
  247. FileSet {
  248. Name = "PART15"
  249. Include {
  250. Options { signature = MD5 }
  251. File = /storage/share/PART15/
  252. }
  253. }
  254. FileSet {
  255. Name = "PART16"
  256. Include {
  257. Options { signature = MD5 }
  258. File = /storage/share/PART16/
  259. }
  260. }
  261. FileSet {
  262. Name = "PART17"
  263. Include {
  264. Options { signature = MD5 }
  265. File = /storage/share/PART17/
  266. }
  267. }
  268. FileSet {
  269. Name = "PART18"
  270. Include {
  271. Options { signature = MD5 }
  272. File = /storage/share/PART18/
  273. }
  274. }
  275. FileSet {
  276. Name = "PART19"
  277. Include {
  278. Options { signature = MD5 }
  279. File = /storage/share/PART19/
  280. }
  281. }
  282. FileSet {
  283. Name = "MISC"
  284. Include {
  285. Options { signature = MD5 }
  286. File = /storage/share/MISC/
  287. }
  288. }
  289. #===DP HDD Archiv LTO5 - BEGIN===
  290. FileSet {
  291. Name = "Das_Instrument_Stimme"
  292. Include {
  293. Options { signature = MD5 }
  294. File = /storage/share/WORK/20140511 Das Instrument Stimme/
  295. }
  296. }
  297. FileSet {
  298. Name = "test"
  299. Include {
  300. Options { signature = MD5 }
  301. File = /storage/share/test/
  302. }
  303. }
  304. FileSet {
  305. Name = "DP001-DP004"
  306. Include {
  307. Options { signature = MD5 }
  308. File = /storage/share/DP001-DP004/
  309. }
  310. }
  311. FileSet {
  312. Name = "DPR01"
  313. Include {
  314. Options { signature = MD5 }
  315. File = /storage/share/DPR01/
  316. }
  317. }
  318. #===DP HDD Archiv LTO5 - END===
  319. FileSet {
  320. Name = "Catalog"
  321. Include {
  322. Options {
  323. signature = MD5
  324. compression=GZIP
  325. }
  326. File = "/var/lib/bacula/bacula.sql"
  327. }
  328. }
  329. # LocalhostBacup FileSet.
  330. FileSet {
  331. Name = "LocalhostFiles"
  332. Include {
  333. Options {
  334. signature = MD5
  335. compression=GZIP
  336. }
  337. File = /etc
  338. File = /home
  339. }
  340. }
  341. #
  342. # When to do the backups, full backup on first sunday of the month,
  343. # differential (i.e. incremental since full) every other sunday,
  344. # and incremental backups other days
  345. Schedule {
  346. Name = "Manual"
  347. #Run = Full 1st sun at 23:05
  348. #Run = Differential 2nd-5th sun at 23:05
  349. #Run = Incremental mon-sat at 23:05
  350. }
  351. # Client (File Services) to backup
  352. Client {
  353. Name = lto-fd
  354. Address = 10.0.21.4
  355. FDPort = 9102
  356. Catalog = MyCatalog
  357. Password = "XhF4v2yOaAf_gv2J3ox0mnHG12p_ru9YY" # password for FileDaemon
  358. File Retention = 90 days # 30 days
  359. Job Retention = 12 months # six months
  360. AutoPrune = no # Prune expired Jobs/Files
  361. }
  362. #
  363. # Second Client (File Services) to backup
  364. # You should change Name, Address, and Password before using
  365. #
  366. Client {
  367. Name = raid-fd
  368. Address = 10.0.21.4
  369. FDPort = 9102
  370. Catalog = MyCatalog
  371. Password = "toYT1TeL-6TMvlva6iKlw7qZ-ckbhY0v7" # password for FileDaemon 2
  372. File Retention = 90 days # 30 days
  373. Job Retention = 12 months # six months
  374. AutoPrune = no # Prune expired Jobs/Files
  375. }
  376. # Definition of file storage device
  377. Storage {
  378. Name = File
  379. # Do not use "localhost" here
  380. Address = 10.0.21.4 # N.B. Use a fully qualified name here
  381. SDPort = 9103
  382. Password = "YJZtoICDQycm3inl-RmiNpFEaT-M_yCpg"
  383. Device = FileStorage
  384. Media Type = File
  385. }
  386. # Definition of "Tape Drive" storage device
  387. Storage {
  388. Name = TapeDrive
  389. # Do not use "localhost" here
  390. Address = 10.0.21.4 # N.B. Use a fully qualified name here
  391. SDPort = 9103
  392. Password = "YJZtoICDQycm3inl-RmiNpFEaT-M_yCpg"
  393. Device = TapeStorage
  394. Media Type = LTO5
  395. }
  396. # Definition of DDS tape storage device
  397. #Storage {
  398. # Name = DDS-4
  399. # Do not use "localhost" here
  400. # Address = localhost # N.B. Use a fully qualified name here
  401. # SDPort = 9103
  402. # Password = "YJZtoICDQycm3inl-RmiNpFEaT-M_yCpg" # password for Storage daemon
  403. # Device = DDS-4 # must be same as Device in Storage daemon
  404. # Media Type = DDS-4 # must be same as MediaType in Storage daemon
  405. # Autochanger = yes # enable for autochanger device
  406. #}
  407. # Definition of 8mm tape storage device
  408. #Storage {
  409. # Name = "8mmDrive"
  410. # Do not use "localhost" here
  411. # Address = localhost # N.B. Use a fully qualified name here
  412. # SDPort = 9103
  413. # Password = "YJZtoICDQycm3inl-RmiNpFEaT-M_yCpg"
  414. # Device = "Exabyte 8mm"
  415. # MediaType = "8mm"
  416. #}
  417. # Definition of DVD storage device
  418. #Storage {
  419. # Name = "DVD"
  420. # Do not use "localhost" here
  421. # Address = localhost # N.B. Use a fully qualified name here
  422. # SDPort = 9103
  423. # Password = "YJZtoICDQycm3inl-RmiNpFEaT-M_yCpg"
  424. # Device = "DVD Writer"
  425. # MediaType = "DVD"
  426. #}
  427. # Generic catalog service
  428. Catalog {
  429. Name = MyCatalog
  430. # Uncomment the following line if you want the dbi driver
  431. # dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport =
  432. dbname = "bacula"; dbuser = ""; dbpassword = ""
  433. }
  434. # Reasonable message delivery -- send most everything to email address
  435. # and to the console
  436. Messages {
  437. Name = Standard
  438. #
  439. # NOTE! If you send to two email or more email addresses, you will need
  440. # to replace the %r in the from field (-f part) with a single valid
  441. # email address in both the mailcommand and the operatorcommand.
  442. # What this does is, it sets the email address that emails would display
  443. # in the FROM field, which is by default the same email as they're being
  444. # sent to. However, if you send email to more than one address, then
  445. # you'll have to set the FROM address manually, to a single address.
  446. # for example, a 'no-reply@mydomain.com', is better since that tends to
  447. # tell (most) people that its coming from an automated source.
  448. #
  449. mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  450. operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  451. mail = root@localhost = all, !skipped
  452. operator = root@localhost = mount
  453. console = all, !skipped, !saved
  454. #
  455. # WARNING! the following will create a file that you must cycle from
  456. # time to time as it will grow indefinitely. However, it will
  457. # also keep all your messages if they scroll off the console.
  458. #
  459. append = "/var/lib/bacula/log" = all, !skipped
  460. catalog = all
  461. }
  462. #
  463. # Message delivery for daemon messages (no job).
  464. Messages {
  465. Name = Daemon
  466. mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  467. mail = root@localhost = all, !skipped
  468. console = all, !skipped, !saved
  469. append = "/var/lib/bacula/log" = all, !skipped
  470. }
  471. # File Pool definition
  472. Pool {
  473. Name = File
  474. Pool Type = Backup
  475. Recycle = yes # Bacula can automatically recycle Volumes
  476. AutoPrune = yes # Prune expired volumes
  477. Volume Retention = 365 days # one year
  478. Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
  479. Maximum Volumes = 100 # Limit number of Volumes in Pool
  480. }
  481. # Tape Pool definition
  482. Pool {
  483. Name = Tape
  484. Pool Type = Backup
  485. Recycle = yes # Bacula can automatically recycle Volumes
  486. AutoPrune = no # Prune expired volumes
  487. Volume Retention = 3650 days # one year
  488. #Maximum Volume Bytes = 1500G # Limit Volume size to something reasonable
  489. Maximum Volumes = 999 # Limit number of Volumes in Pool
  490. LabelFormat = "PART"
  491. }
  492. #
  493. # Restricted console used by tray-monitor to get the status of the director
  494. #
  495. Console {
  496. Name = lto-mon
  497. Password = "Al215m_QeLZHvCtRCc7tqUHG_HQIldY3V"
  498. CommandACL = status, .status
  499. }