bareos-dir.conf 12 KB

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