Advertisement
Guest User

Untitled

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