bareos-dir.conf 12 KB

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