bareos-dir.conf 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. #
  2. # Default Bareos Director configuration file for disk-only backup
  3. #
  4. # For Bareos release 15.2.2 (16 November 2015) -- ubuntu Ubuntu 14.04 LTS
  5. #
  6. # Each configuration item has a reference number that shows
  7. # where this property can be changed in the configuration file.
  8. # Search for the number to find the correct line.
  9. #
  10. # You have to configure the following accoring to your environment:
  11. #
  12. # (#01)Email Address for bareos disaster recovery.
  13. # Specify a mailaddress outside of your backupserver.
  14. # There will be one mail per day.
  15. #
  16. # (#02)Email Address for bareos reports. (Mail Command)
  17. # This mail address will recieve a report about each backup job.
  18. # It will be sent after the backupjob is complete.
  19. # Has to be configured twice ("Standard" and "Daemon" Message Ressources)
  20. #
  21. # (#03)Email Address for bareos operator. (Operator Command)
  22. # This mail address will recieve a mail immediately when the
  23. # bareos system needs an operator intervention.
  24. # May be the same address as in (#02)
  25. #
  26. #
  27. # This disk-only setup stores all data into /var/lib/bareos/storage
  28. #
  29. # The preconfigured backup scheme is as follows:
  30. #
  31. # Full Backups are done on first Saturday at 21:00 (#04)
  32. # Full Backups are written into the "Full" Pool (#05)
  33. # Full Backups are kept for 365 Days (#06)
  34. #
  35. # Differential Backups are done on 2nd to 5th Saturday at 21:00 (#07)
  36. # Differential Backups are written into the "Differential" Pool (#08)
  37. # Differential Backups are kept for 90 Days (#09)
  38. #
  39. # Incremental Backups are done monday to friday at 21:00 (#10)
  40. # Incremental Backups are written into the "Incremental" Pool (#11)
  41. # Incremental Backups are kept for 30 Days (#12)
  42. #
  43. # What you also have to do is to change the default fileset (#13)
  44. # to either one of the demo filesets given or create our own fileset.
  45. #
  46. #
  47. #
  48. # For Bareos release 15.2.2 (16 November 2015) -- ubuntu Ubuntu 14.04 LTS
  49. #
  50. #
  51. Director { # define myself
  52. Name = lto7-dir
  53. QueryFile = "/usr/lib/bareos/scripts/query.sql"
  54. Maximum Concurrent Jobs = 10
  55. Password = "fsiH4bZpifKAyInabNcqmHwV2Z8++kAOzQYCtdr0ipdO" # Console password
  56. Messages = Daemon
  57. Auditing = yes
  58. # Enable the Heartbeat if you experience connection losses
  59. # (eg. because of your router or firewall configuration).
  60. # Additionally the Heartbeat can be enabled in bareos-sd and bareos-fd.
  61. #
  62. # Heartbeat Interval = 1m
  63. # remove comment in next line to load dynamic backends from specified directory
  64. # Backend Directory = /usr/lib/bareos/backends
  65. # remove comment from "Plugin Directory" to load plugins from specified directory.
  66. # if "Plugin Names" is defined, only the specified plugins will be loaded,
  67. # otherwise all director plugins (*-dir.so) from the "Plugin Directory".
  68. #
  69. # Plugin Directory = /usr/lib/bareos/plugins
  70. # Plugin Names = ""
  71. }
  72. JobDefs {
  73. Name = "DefaultJob"
  74. Type = Backup
  75. Level = Incremental
  76. Client = lto7-fd
  77. FileSet = "SelfTest" # selftest fileset (#13)
  78. #Schedule = "WeeklyCycle"
  79. Storage = File
  80. Messages = Standard
  81. Pool = Incremental
  82. Priority = 10
  83. Write Bootstrap = "/var/lib/bareos/%c.bsr"
  84. Full Backup Pool = Full # write Full Backups into "Full" Pool (#05)
  85. Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool (#08)
  86. Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool (#11)
  87. }
  88. #
  89. # Define the main nightly save backup job
  90. # By default, this job will back up to disk in /var/lib/bareos/storage
  91. Job {
  92. Name = "Backup_archivo_to_LTO7"
  93. JobDefs = "DefaultJob"
  94. Client = archivo-fd
  95. Storage="LTO7"
  96. FileSet="archivo all dirs"
  97. }
  98. #
  99. # Define the main nightly save backup job
  100. # By default, this job will back up to disk in /var/lib/bareos/storage
  101. Job {
  102. Name = "Backup_archivo_Test"
  103. JobDefs = "DefaultJob"
  104. FileSet="archivo test"
  105. Storage="LTO7"
  106. #Client = lto7-fd
  107. Client = archivo-fd
  108. }
  109. #
  110. # Define the main nightly save backup job
  111. # By default, this job will back up to disk in /var/lib/bareos/storage
  112. Job {
  113. Name = "Backup_SelfTest"
  114. JobDefs = "DefaultJob"
  115. FileSet="SelfTest"
  116. Storage="LTO7"
  117. #Client = lto7-fd
  118. #Client = archivo-fd
  119. }
  120. #
  121. # Backup the catalog database (after the nightly save)
  122. #
  123. Job {
  124. Name = "BackupCatalog"
  125. JobDefs = "DefaultJob"
  126. Level = Full
  127. FileSet="Catalog"
  128. #Schedule = "WeeklyCycleAfterBackup"
  129. # This creates an ASCII copy of the catalog
  130. # Arguments to make_catalog_backup.pl are:
  131. # make_catalog_backup.pl <catalog-name>
  132. RunBeforeJob = "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog"
  133. # This deletes the copy of the catalog
  134. RunAfterJob = "/usr/lib/bareos/scripts/delete_catalog_backup"
  135. # This sends the bootstrap via mail for disaster recovery.
  136. # Should be sent to another system, please change recipient accordingly
  137. Write Bootstrap = "|/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root@localhost" # (#01)
  138. Priority = 11 # run after main backup
  139. }
  140. #
  141. # Standard Restore template, to be changed by Console program
  142. # Only one such job is needed for all Jobs/Clients/Storage ...
  143. #
  144. Job {
  145. Name = "RestoreFiles"
  146. Type = Restore
  147. Client=lto7-fd
  148. FileSet = "Linux All"
  149. Storage = File
  150. Pool = Incremental
  151. Messages = Standard
  152. Where = /storage/restore
  153. }
  154. @/etc/bareos/bareos-dir.d/fileset.conf
  155. Schedule {
  156. Name = "WeeklyCycle"
  157. Run = Full 1st sat at 21:00 # (#04)
  158. Run = Differential 2nd-5th sat at 21:00 # (#07)
  159. Run = Incremental mon-fri at 21:00 # (#10)
  160. }
  161. # This schedule does the catalog. It starts after the WeeklyCycle
  162. Schedule {
  163. Name = "WeeklyCycleAfterBackup"
  164. Run = Full mon-fri at 21:10
  165. }
  166. # Client (File Services) to backup
  167. Client {
  168. Name = lto7-fd
  169. Address = lto7
  170. Password = "4cpnIZAfirCJcF05x0y0iYo4NXz4WsnHoYojuUxs75/6" # password for FileDaemon
  171. }
  172. Client {
  173. Name = archivo-fd
  174. Address = 10.0.21.2
  175. Password = "mP1AxBHUT+9ow2k1mnWHRNvzWTeuBiGOY9xKX+0zwCUb" # password for FileDaemon
  176. }
  177. #
  178. # Definition of file storage device
  179. #
  180. Storage {
  181. Name = File
  182. # Do not use "localhost" here
  183. Address = lto7 # N.B. Use a fully qualified name here
  184. Password = "Ia+A/4PGvr4kFgI9CYOZX73qqRXqUi8llZNymggM3k18"
  185. Device = FileStorage
  186. Media Type = File
  187. }
  188. @/etc/bareos/bareos-dir.d/tape.conf
  189. #
  190. # Generic catalog service
  191. #
  192. Catalog {
  193. Name = MyCatalog
  194. # Uncomment the following lines if you want the dbi driver
  195. # dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =
  196. #dbdriver = "postgresql"
  197. dbdriver = postgresql
  198. dbname = bareos
  199. dbuser = bareos
  200. dbpassword = 0gxmuamUuL5T
  201. }
  202. #
  203. # Reasonable message delivery -- send most everything to email address and to the console
  204. #
  205. Messages {
  206. Name = Standard
  207. mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
  208. operatorcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r"
  209. mail = root@localhost = all, !skipped, !audit # (#02)
  210. operator = root@localhost = mount # (#03)
  211. console = all, !skipped, !saved, !audit
  212. append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
  213. catalog = all, !audit
  214. }
  215. #
  216. # Message delivery for daemon messages (no job).
  217. #
  218. Messages {
  219. Name = Daemon
  220. mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r"
  221. mail = root@localhost = all, !skipped, !audit # (#02)
  222. console = all, !skipped, !saved, !audit
  223. append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
  224. append = "/var/log/bareos/bareos-audit.log" = audit
  225. }
  226. #
  227. # Full Pool definition
  228. #
  229. Pool {
  230. Name = Full
  231. Pool Type = Backup
  232. Recycle = yes # Bareos can automatically recycle Volumes
  233. AutoPrune = yes # Prune expired volumes
  234. Volume Retention = 3650 days # How long should the Full Backups be kept? (#06)
  235. Maximum Volume Bytes = 6144G # Limit Volume size to something reasonable
  236. Maximum Volumes = 100 # Limit number of Volumes in Pool
  237. Label Format = "Full-" # Volumes will be labeled "Full-<volume-id>"
  238. }
  239. #
  240. # Differential Pool definition
  241. #
  242. Pool {
  243. Name = Differential
  244. Pool Type = Backup
  245. Recycle = yes # Bareos can automatically recycle Volumes
  246. AutoPrune = yes # Prune expired volumes
  247. Volume Retention = 365 days # How long should the Differential Backups be kept? (#09)
  248. Maximum Volume Bytes = 6144G # Limit Volume size to something reasonable
  249. Maximum Volumes = 100 # Limit number of Volumes in Pool
  250. Label Format = "Differential-" # Volumes will be labeled "Differential-<volume-id>"
  251. }
  252. #
  253. # Incremental Pool definition
  254. #
  255. Pool {
  256. Name = Incremental
  257. Pool Type = Backup
  258. Recycle = yes # Bareos can automatically recycle Volumes
  259. AutoPrune = yes # Prune expired volumes
  260. Volume Retention = 90 days # How long should the Incremental Backups be kept? (#12)
  261. Maximum Volume Bytes = 6144G # Limit Volume size to something reasonable
  262. Maximum Volumes = 100 # Limit number of Volumes in Pool
  263. Label Format = "Incremental-" # Volumes will be labeled "Incremental-<volume-id>"
  264. }
  265. #
  266. # Scratch pool definition
  267. #
  268. Pool {
  269. Name = Scratch
  270. Pool Type = Backup
  271. }
  272. #
  273. # Restricted console used by tray-monitor to get the status of the director
  274. #
  275. Console {
  276. Name = lto7-mon
  277. Password = "CLHbqd3OZ/dLWmh1BHJaGgSHtCpcXigknhQtudZLnuGu"
  278. CommandACL = status, .status
  279. JobACL = *all*
  280. }