bareos-dir.conf 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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 = "BackupClient1"
  93. JobDefs = "DefaultJob"
  94. }
  95. #
  96. # Backup the catalog database (after the nightly save)
  97. #
  98. Job {
  99. Name = "BackupCatalog"
  100. JobDefs = "DefaultJob"
  101. Level = Full
  102. FileSet="Catalog"
  103. Schedule = "WeeklyCycleAfterBackup"
  104. # This creates an ASCII copy of the catalog
  105. # Arguments to make_catalog_backup.pl are:
  106. # make_catalog_backup.pl <catalog-name>
  107. RunBeforeJob = "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog"
  108. # This deletes the copy of the catalog
  109. RunAfterJob = "/usr/lib/bareos/scripts/delete_catalog_backup"
  110. # This sends the bootstrap via mail for disaster recovery.
  111. # Should be sent to another system, please change recipient accordingly
  112. Write Bootstrap = "|/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root@localhost" # (#01)
  113. Priority = 11 # run after main backup
  114. }
  115. #
  116. # Standard Restore template, to be changed by Console program
  117. # Only one such job is needed for all Jobs/Clients/Storage ...
  118. #
  119. Job {
  120. Name = "RestoreFiles"
  121. Type = Restore
  122. Client=lto7-fd
  123. FileSet = "Linux All"
  124. Storage = File
  125. Pool = Incremental
  126. Messages = Standard
  127. Where = /tmp/bareos-restores
  128. }
  129. FileSet {
  130. Name = "Windows All Drives"
  131. Enable VSS = yes
  132. Include {
  133. Options {
  134. Signature = MD5
  135. Drive Type = fixed
  136. IgnoreCase = yes
  137. WildFile = "[A-Z]:/pagefile.sys"
  138. WildDir = "[A-Z]:/RECYCLER"
  139. WildDir = "[A-Z]:/$RECYCLE.BIN"
  140. WildDir = "[A-Z]:/System Volume Information"
  141. Exclude = yes
  142. }
  143. File = /
  144. }
  145. }
  146. FileSet {
  147. Name = "Linux All"
  148. Include {
  149. Options {
  150. Signature = MD5 # calculate md5 checksum per file
  151. One FS = No # change into other filessytems
  152. FS Type = ext2 # filesystems of given types will be backed up
  153. FS Type = ext3 # others will be ignored
  154. FS Type = ext4
  155. FS Type = xfs
  156. FS Type = zfs
  157. FS Type = reiserfs
  158. FS Type = jfs
  159. FS Type = btrfs
  160. }
  161. File = /
  162. }
  163. # Things that usually have to be excluded
  164. # You have to exclude /var/lib/bareos/storage
  165. # on your bareos server
  166. Exclude {
  167. File = /var/lib/bareos
  168. File = /var/lib/bareos/storage
  169. File = /proc
  170. File = /tmp
  171. File = /.journal
  172. File = /.fsck
  173. }
  174. }
  175. # fileset just to backup some files for selftest
  176. FileSet {
  177. Name = "SelfTest"
  178. Include {
  179. Options {
  180. Signature = MD5 # calculate md5 checksum per file
  181. }
  182. File = "/usr/sbin"
  183. }
  184. }
  185. Schedule {
  186. Name = "WeeklyCycle"
  187. Run = Full 1st sat at 21:00 # (#04)
  188. Run = Differential 2nd-5th sat at 21:00 # (#07)
  189. Run = Incremental mon-fri at 21:00 # (#10)
  190. }
  191. # This schedule does the catalog. It starts after the WeeklyCycle
  192. Schedule {
  193. Name = "WeeklyCycleAfterBackup"
  194. Run = Full mon-fri at 21:10
  195. }
  196. # This is the backup of the catalog
  197. FileSet {
  198. Name = "Catalog"
  199. Include {
  200. Options {
  201. signature = MD5
  202. }
  203. File = "/var/lib/bareos/bareos.sql" # database dump
  204. File = "/etc/bareos" # configuration
  205. }
  206. }
  207. # Client (File Services) to backup
  208. Client {
  209. Name = lto7-fd
  210. Address = lto7
  211. Password = "4cpnIZAfirCJcF05x0y0iYo4NXz4WsnHoYojuUxs75/6" # password for FileDaemon
  212. }
  213. #
  214. # Definition of file storage device
  215. #
  216. Storage {
  217. Name = File
  218. # Do not use "localhost" here
  219. Address = lto7 # N.B. Use a fully qualified name here
  220. Password = "Ia+A/4PGvr4kFgI9CYOZX73qqRXqUi8llZNymggM3k18"
  221. Device = FileStorage
  222. Media Type = File
  223. }
  224. #
  225. # Generic catalog service
  226. #
  227. Catalog {
  228. Name = MyCatalog
  229. # Uncomment the following lines if you want the dbi driver
  230. # dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =
  231. #dbdriver = "postgresql"
  232. dbdriver = postgresql
  233. dbname = bareos
  234. dbuser = bareos
  235. dbpassword = 0gxmuamUuL5T
  236. }
  237. #
  238. # Reasonable message delivery -- send most everything to email address and to the console
  239. #
  240. Messages {
  241. Name = Standard
  242. mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
  243. operatorcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r"
  244. mail = root@localhost = all, !skipped, !audit # (#02)
  245. operator = root@localhost = mount # (#03)
  246. console = all, !skipped, !saved, !audit
  247. append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
  248. catalog = all, !audit
  249. }
  250. #
  251. # Message delivery for daemon messages (no job).
  252. #
  253. Messages {
  254. Name = Daemon
  255. mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r"
  256. mail = root@localhost = all, !skipped, !audit # (#02)
  257. console = all, !skipped, !saved, !audit
  258. append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
  259. append = "/var/log/bareos/bareos-audit.log" = audit
  260. }
  261. #
  262. # Full Pool definition
  263. #
  264. Pool {
  265. Name = Full
  266. Pool Type = Backup
  267. Recycle = yes # Bareos can automatically recycle Volumes
  268. AutoPrune = yes # Prune expired volumes
  269. Volume Retention = 365 days # How long should the Full Backups be kept? (#06)
  270. Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
  271. Maximum Volumes = 100 # Limit number of Volumes in Pool
  272. Label Format = "Full-" # Volumes will be labeled "Full-<volume-id>"
  273. }
  274. #
  275. # Differential Pool definition
  276. #
  277. Pool {
  278. Name = Differential
  279. Pool Type = Backup
  280. Recycle = yes # Bareos can automatically recycle Volumes
  281. AutoPrune = yes # Prune expired volumes
  282. Volume Retention = 90 days # How long should the Differential Backups be kept? (#09)
  283. Maximum Volume Bytes = 10G # Limit Volume size to something reasonable
  284. Maximum Volumes = 100 # Limit number of Volumes in Pool
  285. Label Format = "Differential-" # Volumes will be labeled "Differential-<volume-id>"
  286. }
  287. #
  288. # Incremental Pool definition
  289. #
  290. Pool {
  291. Name = Incremental
  292. Pool Type = Backup
  293. Recycle = yes # Bareos can automatically recycle Volumes
  294. AutoPrune = yes # Prune expired volumes
  295. Volume Retention = 30 days # How long should the Incremental Backups be kept? (#12)
  296. Maximum Volume Bytes = 1G # Limit Volume size to something reasonable
  297. Maximum Volumes = 100 # Limit number of Volumes in Pool
  298. Label Format = "Incremental-" # Volumes will be labeled "Incremental-<volume-id>"
  299. }
  300. #
  301. # Scratch pool definition
  302. #
  303. Pool {
  304. Name = Scratch
  305. Pool Type = Backup
  306. }
  307. #
  308. # Restricted console used by tray-monitor to get the status of the director
  309. #
  310. Console {
  311. Name = lto7-mon
  312. Password = "CLHbqd3OZ/dLWmh1BHJaGgSHtCpcXigknhQtudZLnuGu"
  313. CommandACL = status, .status
  314. JobACL = *all*
  315. }