bareos-dir.conf 11 KB

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