schema.yaml 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227
  1. type: object
  2. required:
  3. - repositories
  4. additionalProperties: false
  5. properties:
  6. constants:
  7. type: object
  8. description: |
  9. Constants to use in the configuration file. Within option values,
  10. all occurrences of the constant name in curly braces will be
  11. replaced with the constant value. For example, if you have a
  12. constant named "app_name" with the value "myapp", then the string
  13. "{app_name}" will be replaced with "myapp" in the configuration
  14. file.
  15. example:
  16. app_name: myapp
  17. user: myuser
  18. source_directories:
  19. type: array
  20. items:
  21. type: string
  22. description: |
  23. List of source directories and files to back up. Globs and tildes
  24. are expanded. Do not backslash spaces in path names.
  25. example:
  26. - /home
  27. - /etc
  28. - /var/log/syslog*
  29. - /home/user/path with spaces
  30. repositories:
  31. type: array
  32. items:
  33. type: object
  34. required:
  35. - path
  36. properties:
  37. path:
  38. type: string
  39. example: ssh://user@backupserver/./{fqdn}
  40. label:
  41. type: string
  42. example: backupserver
  43. description: |
  44. A required list of local or remote repositories with paths and
  45. optional labels (which can be used with the --repository flag to
  46. select a repository). Tildes are expanded. Multiple repositories are
  47. backed up to in sequence. Borg placeholders can be used. See the
  48. output of "borg help placeholders" for details. See ssh_command for
  49. SSH options like identity file or port. If systemd service is used,
  50. then add local repository paths in the systemd service file to the
  51. ReadWritePaths list. Prior to borgmatic 1.7.10, repositories was a
  52. list of plain path strings.
  53. example:
  54. - path: ssh://user@backupserver/./sourcehostname.borg
  55. label: backupserver
  56. - path: /mnt/backup
  57. label: local
  58. working_directory:
  59. type: string
  60. description: |
  61. Working directory to use when running actions, useful for backing up
  62. using relative source directory paths. Does not currently apply to
  63. borgmatic configuration file paths or includes. Tildes are expanded.
  64. See http://borgbackup.readthedocs.io/en/stable/usage/create.html for
  65. details. Defaults to not set.
  66. example: /path/to/working/directory
  67. one_file_system:
  68. type: boolean
  69. description: |
  70. Stay in same file system; do not cross mount points beyond the given
  71. source directories. Defaults to false. But when a database hook is
  72. used, the setting here is ignored and one_file_system is considered
  73. true.
  74. example: true
  75. numeric_ids:
  76. type: boolean
  77. description: |
  78. Only store/extract numeric user and group identifiers. Defaults to
  79. false.
  80. example: true
  81. atime:
  82. type: boolean
  83. description: |
  84. Store atime into archive. Defaults to true in Borg < 1.2, false in
  85. Borg 1.2+.
  86. example: false
  87. ctime:
  88. type: boolean
  89. description: Store ctime into archive. Defaults to true.
  90. example: false
  91. birthtime:
  92. type: boolean
  93. description: |
  94. Store birthtime (creation date) into archive. Defaults to true.
  95. example: false
  96. read_special:
  97. type: boolean
  98. description: |
  99. Use Borg's --read-special flag to allow backup of block and other
  100. special devices. Use with caution, as it will lead to problems if
  101. used when backing up special devices such as /dev/zero. Defaults to
  102. false. But when a database hook is used, the setting here is ignored
  103. and read_special is considered true.
  104. example: false
  105. flags:
  106. type: boolean
  107. description: |
  108. Record filesystem flags (e.g. NODUMP, IMMUTABLE) in archive.
  109. Defaults to true.
  110. example: true
  111. files_cache:
  112. type: string
  113. description: |
  114. Mode in which to operate the files cache. See
  115. http://borgbackup.readthedocs.io/en/stable/usage/create.html for
  116. details. Defaults to "ctime,size,inode".
  117. example: ctime,size,inode
  118. local_path:
  119. type: string
  120. description: |
  121. Alternate Borg local executable. Defaults to "borg".
  122. example: borg1
  123. remote_path:
  124. type: string
  125. description: |
  126. Alternate Borg remote executable. Defaults to "borg".
  127. example: borg1
  128. patterns:
  129. type: array
  130. items:
  131. type: string
  132. description: |
  133. Any paths matching these patterns are included/excluded from
  134. backups. Globs are expanded. (Tildes are not.) See the output of
  135. "borg help patterns" for more details. Quote any value if it
  136. contains leading punctuation, so it parses correctly. Note that only
  137. one of "patterns" and "source_directories" may be used.
  138. example:
  139. - 'R /'
  140. - '- /home/*/.cache'
  141. - '+ /home/susan'
  142. - '- /home/*'
  143. patterns_from:
  144. type: array
  145. items:
  146. type: string
  147. description: |
  148. Read include/exclude patterns from one or more separate named files,
  149. one pattern per line. Note that Borg considers this option
  150. experimental. See the output of "borg help patterns" for more
  151. details.
  152. example:
  153. - /etc/borgmatic/patterns
  154. exclude_patterns:
  155. type: array
  156. items:
  157. type: string
  158. description: |
  159. Any paths matching these patterns are excluded from backups. Globs
  160. and tildes are expanded. Note that a glob pattern must either start
  161. with a glob or be an absolute path. Do not backslash spaces in path
  162. names. See the output of "borg help patterns" for more details.
  163. example:
  164. - '*.pyc'
  165. - /home/*/.cache
  166. - '*/.vim*.tmp'
  167. - /etc/ssl
  168. - /home/user/path with spaces
  169. exclude_from:
  170. type: array
  171. items:
  172. type: string
  173. description: |
  174. Read exclude patterns from one or more separate named files, one
  175. pattern per line. See the output of "borg help patterns" for more
  176. details.
  177. example:
  178. - /etc/borgmatic/excludes
  179. exclude_caches:
  180. type: boolean
  181. description: |
  182. Exclude directories that contain a CACHEDIR.TAG file. See
  183. http://www.brynosaurus.com/cachedir/spec.html for details. Defaults
  184. to false.
  185. example: true
  186. exclude_if_present:
  187. type: array
  188. items:
  189. type: string
  190. description: |
  191. Exclude directories that contain a file with the given filenames.
  192. Defaults to not set.
  193. example:
  194. - .nobackup
  195. keep_exclude_tags:
  196. type: boolean
  197. description: |
  198. If true, the exclude_if_present filename is included in backups.
  199. Defaults to false, meaning that the exclude_if_present filename is
  200. omitted from backups.
  201. example: true
  202. exclude_nodump:
  203. type: boolean
  204. description: |
  205. Exclude files with the NODUMP flag. Defaults to false.
  206. example: true
  207. borgmatic_source_directory:
  208. type: string
  209. description: |
  210. Path for additional source files used for temporary internal state
  211. like borgmatic database dumps. Note that changing this path prevents
  212. "borgmatic restore" from finding any database dumps created before
  213. the change. Defaults to ~/.borgmatic
  214. example: /tmp/borgmatic
  215. store_config_files:
  216. type: boolean
  217. description: |
  218. Store configuration files used to create a backup in the backup
  219. itself. Defaults to true. Changing this to false prevents "borgmatic
  220. bootstrap" from extracting configuration files from the backup.
  221. example: false
  222. source_directories_must_exist:
  223. type: boolean
  224. description: |
  225. If true, then source directories must exist, otherwise an error is
  226. raised. Defaults to false.
  227. example: true
  228. encryption_passcommand:
  229. type: string
  230. description: |
  231. The standard output of this command is used to unlock the encryption
  232. key. Only use on repositories that were initialized with
  233. passcommand/repokey/keyfile encryption. Note that if both
  234. encryption_passcommand and encryption_passphrase are set, then
  235. encryption_passphrase takes precedence. This can also be used to
  236. access encrypted systemd service credentials. Defaults to not set.
  237. For more details, see:
  238. https://torsion.org/borgmatic/docs/how-to/provide-your-passwords/
  239. example: "secret-tool lookup borg-repository repo-name"
  240. encryption_passphrase:
  241. type: string
  242. description: |
  243. Passphrase to unlock the encryption key with. Only use on
  244. repositories that were initialized with passphrase/repokey/keyfile
  245. encryption. Quote the value if it contains punctuation, so it parses
  246. correctly. And backslash any quote or backslash literals as well.
  247. Defaults to not set.
  248. example: "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
  249. checkpoint_interval:
  250. type: integer
  251. description: |
  252. Number of seconds between each checkpoint during a long-running
  253. backup. See https://borgbackup.readthedocs.io/en/stable/faq.html for
  254. details. Defaults to checkpoints every 1800 seconds (30 minutes).
  255. example: 1800
  256. checkpoint_volume:
  257. type: integer
  258. description: |
  259. Number of backed up bytes between each checkpoint during a
  260. long-running backup. Only supported with Borg 2+. See
  261. https://borgbackup.readthedocs.io/en/stable/faq.html for details.
  262. Defaults to only time-based checkpointing (see
  263. "checkpoint_interval") instead of volume-based checkpointing.
  264. example: 1048576
  265. chunker_params:
  266. type: string
  267. description: |
  268. Specify the parameters passed to the chunker (CHUNK_MIN_EXP,
  269. CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE). See
  270. https://borgbackup.readthedocs.io/en/stable/internals.html for
  271. details. Defaults to "19,23,21,4095".
  272. example: 19,23,21,4095
  273. compression:
  274. type: string
  275. description: |
  276. Type of compression to use when creating archives. (Compression
  277. level can be added separated with a comma, like "zstd,7".) See
  278. http://borgbackup.readthedocs.io/en/stable/usage/create.html for
  279. details. Defaults to "lz4".
  280. example: lz4
  281. upload_rate_limit:
  282. type: integer
  283. description: |
  284. Remote network upload rate limit in kiBytes/second. Defaults to
  285. unlimited.
  286. example: 100
  287. upload_buffer_size:
  288. type: integer
  289. description: |
  290. Size of network upload buffer in MiB. Defaults to no buffer.
  291. example: 160
  292. retries:
  293. type: integer
  294. description: |
  295. Number of times to retry a failing backup before giving up. Defaults
  296. to 0 (i.e., does not attempt retry).
  297. example: 3
  298. retry_wait:
  299. type: integer
  300. description: |
  301. Wait time between retries (in seconds) to allow transient issues
  302. to pass. Increases after each retry by that same wait time as a
  303. form of backoff. Defaults to 0 (no wait).
  304. example: 10
  305. temporary_directory:
  306. type: string
  307. description: |
  308. Directory where temporary Borg files are stored. Defaults to
  309. $TMPDIR. See "Resource Usage" at
  310. https://borgbackup.readthedocs.io/en/stable/usage/general.html for
  311. details.
  312. example: /path/to/tmpdir
  313. ssh_command:
  314. type: string
  315. description: |
  316. Command to use instead of "ssh". This can be used to specify ssh
  317. options. Defaults to not set.
  318. example: ssh -i /path/to/private/key
  319. borg_base_directory:
  320. type: string
  321. description: |
  322. Base path used for various Borg directories. Defaults to $HOME,
  323. ~$USER, or ~.
  324. example: /path/to/base
  325. borg_config_directory:
  326. type: string
  327. description: |
  328. Path for Borg configuration files. Defaults to
  329. $borg_base_directory/.config/borg
  330. example: /path/to/base/config
  331. borg_cache_directory:
  332. type: string
  333. description: |
  334. Path for Borg cache files. Defaults to
  335. $borg_base_directory/.cache/borg
  336. example: /path/to/base/cache
  337. borg_files_cache_ttl:
  338. type: integer
  339. description: |
  340. Maximum time to live (ttl) for entries in the Borg files cache.
  341. example: 20
  342. borg_security_directory:
  343. type: string
  344. description: |
  345. Path for Borg security and encryption nonce files. Defaults to
  346. $borg_base_directory/.config/borg/security
  347. example: /path/to/base/config/security
  348. borg_keys_directory:
  349. type: string
  350. description: |
  351. Path for Borg encryption key files. Defaults to
  352. $borg_base_directory/.config/borg/keys
  353. example: /path/to/base/config/keys
  354. borg_exit_codes:
  355. type: array
  356. items:
  357. type: object
  358. required: ['code', 'treat_as']
  359. additionalProperties: false
  360. properties:
  361. code:
  362. type: integer
  363. not: {enum: [0]}
  364. description: |
  365. The exit code for an existing Borg warning or error.
  366. example: 100
  367. treat_as:
  368. type: string
  369. enum: ['error', 'warning']
  370. description: |
  371. Whether to consider the exit code as an error or as a
  372. warning in borgmatic.
  373. example: error
  374. description: |
  375. A list of Borg exit codes that should be elevated to errors or
  376. squashed to warnings as indicated. By default, Borg error exit codes
  377. (2 to 99) are treated as errors while warning exit codes (1 and
  378. 100+) are treated as warnings. Exit codes other than 1 and 2 are
  379. only present in Borg 1.4.0+.
  380. example:
  381. - code: 13
  382. treat_as: warning
  383. - code: 100
  384. treat_as: error
  385. umask:
  386. type: integer
  387. description: |
  388. Umask used for when executing Borg or calling hooks. Defaults to
  389. 0077 for Borg or the umask that borgmatic is run with for hooks.
  390. example: 0077
  391. lock_wait:
  392. type: integer
  393. description: |
  394. Maximum seconds to wait for acquiring a repository/cache lock.
  395. Defaults to 1.
  396. example: 5
  397. archive_name_format:
  398. type: string
  399. description: |
  400. Name of the archive to create. Borg placeholders can be used. See
  401. the output of "borg help placeholders" for details. Defaults to
  402. "{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}" with Borg 1 and
  403. "{hostname}" with Borg 2, as Borg 2 does not require unique
  404. archive names; identical archive names form a common "series" that
  405. can be targeted together. When running actions like repo-list,
  406. info, or check, borgmatic automatically tries to match only
  407. archives created with this name format.
  408. example: "{hostname}-documents-{now}"
  409. match_archives:
  410. type: string
  411. description: |
  412. A Borg pattern for filtering down the archives used by borgmatic
  413. actions that operate on multiple archives. For Borg 1.x, use a shell
  414. pattern here and see the output of "borg help placeholders" for
  415. details. For Borg 2.x, see the output of "borg help match-archives".
  416. If match_archives is not specified, borgmatic defaults to deriving
  417. the match_archives value from archive_name_format.
  418. example: "sh:{hostname}-*"
  419. relocated_repo_access_is_ok:
  420. type: boolean
  421. description: |
  422. Bypass Borg error about a repository that has been moved. Defaults
  423. to not bypassing.
  424. example: true
  425. unknown_unencrypted_repo_access_is_ok:
  426. type: boolean
  427. description: |
  428. Bypass Borg error about a previously unknown unencrypted repository.
  429. Defaults to not bypassing.
  430. example: true
  431. check_i_know_what_i_am_doing:
  432. type: boolean
  433. description: |
  434. Bypass Borg confirmation about check with repair option. Defaults to
  435. an interactive prompt from Borg.
  436. example: true
  437. extra_borg_options:
  438. type: object
  439. additionalProperties: false
  440. properties:
  441. init:
  442. type: string
  443. description: |
  444. Extra command-line options to pass to "borg init".
  445. example: "--extra-option"
  446. create:
  447. type: string
  448. description: |
  449. Extra command-line options to pass to "borg create".
  450. example: "--extra-option"
  451. prune:
  452. type: string
  453. description: |
  454. Extra command-line options to pass to "borg prune".
  455. example: "--extra-option"
  456. compact:
  457. type: string
  458. description: |
  459. Extra command-line options to pass to "borg compact".
  460. example: "--extra-option"
  461. check:
  462. type: string
  463. description: |
  464. Extra command-line options to pass to "borg check".
  465. example: "--extra-option"
  466. description: |
  467. Additional options to pass directly to particular Borg commands,
  468. handy for Borg options that borgmatic does not yet support natively.
  469. Note that borgmatic does not perform any validation on these
  470. options. Running borgmatic with "--verbosity 2" shows the exact Borg
  471. command-line invocation.
  472. keep_within:
  473. type: string
  474. description: |
  475. Keep all archives within this time interval. See "skip_actions" for
  476. disabling pruning altogether.
  477. example: 3H
  478. keep_secondly:
  479. type: integer
  480. description: Number of secondly archives to keep.
  481. example: 60
  482. keep_minutely:
  483. type: integer
  484. description: Number of minutely archives to keep.
  485. example: 60
  486. keep_hourly:
  487. type: integer
  488. description: Number of hourly archives to keep.
  489. example: 24
  490. keep_daily:
  491. type: integer
  492. description: Number of daily archives to keep.
  493. example: 7
  494. keep_weekly:
  495. type: integer
  496. description: Number of weekly archives to keep.
  497. example: 4
  498. keep_monthly:
  499. type: integer
  500. description: Number of monthly archives to keep.
  501. example: 6
  502. keep_yearly:
  503. type: integer
  504. description: Number of yearly archives to keep.
  505. example: 1
  506. prefix:
  507. type: string
  508. description: |
  509. Deprecated. When pruning or checking archives, only consider archive
  510. names starting with this prefix. Borg placeholders can be used. See
  511. the output of "borg help placeholders" for details. If a prefix is
  512. not specified, borgmatic defaults to matching archives based on the
  513. archive_name_format (see above).
  514. example: sourcehostname
  515. checks:
  516. type: array
  517. items:
  518. type: object
  519. oneOf:
  520. - required: [name]
  521. additionalProperties: false
  522. properties:
  523. name:
  524. type: string
  525. enum:
  526. - archives
  527. - data
  528. - extract
  529. - disabled
  530. description: |
  531. Name of the consistency check to run:
  532. * "repository" checks the consistency of the
  533. repository.
  534. * "archives" checks all of the archives.
  535. * "data" verifies the integrity of the data
  536. within the archives and implies the "archives"
  537. check as well.
  538. * "spot" checks that some percentage of source
  539. files are found in the most recent archive (with
  540. identical contents).
  541. * "extract" does an extraction dry-run of the
  542. most recent archive.
  543. * See "skip_actions" for disabling checks
  544. altogether.
  545. example: spot
  546. frequency:
  547. type: string
  548. description: |
  549. How frequently to run this type of consistency
  550. check (as a best effort). The value is a number
  551. followed by a unit of time. E.g., "2 weeks" to
  552. run this consistency check no more than every
  553. two weeks for a given repository or "1 month" to
  554. run it no more than monthly. Defaults to
  555. "always": running this check every time checks
  556. are run.
  557. example: 2 weeks
  558. only_run_on:
  559. type: array
  560. items:
  561. type: string
  562. description: |
  563. After the "frequency" duration has elapsed, only
  564. run this check if the current day of the week
  565. matches one of these values (the name of a day of
  566. the week in the current locale). "weekday" and
  567. "weekend" are also accepted. Defaults to running
  568. the check on any day of the week.
  569. example:
  570. - Saturday
  571. - Sunday
  572. - required: [name]
  573. additionalProperties: false
  574. properties:
  575. name:
  576. type: string
  577. enum:
  578. - repository
  579. description: |
  580. Name of the consistency check to run:
  581. * "repository" checks the consistency of the
  582. repository.
  583. * "archives" checks all of the archives.
  584. * "data" verifies the integrity of the data
  585. within the archives and implies the "archives"
  586. check as well.
  587. * "spot" checks that some percentage of source
  588. files are found in the most recent archive (with
  589. identical contents).
  590. * "extract" does an extraction dry-run of the
  591. most recent archive.
  592. * See "skip_actions" for disabling checks
  593. altogether.
  594. example: spot
  595. frequency:
  596. type: string
  597. description: |
  598. How frequently to run this type of consistency
  599. check (as a best effort). The value is a number
  600. followed by a unit of time. E.g., "2 weeks" to
  601. run this consistency check no more than every
  602. two weeks for a given repository or "1 month" to
  603. run it no more than monthly. Defaults to
  604. "always": running this check every time checks
  605. are run.
  606. example: 2 weeks
  607. only_run_on:
  608. type: array
  609. items:
  610. type: string
  611. description: |
  612. After the "frequency" duration has elapsed, only
  613. run this check if the current day of the week
  614. matches one of these values (the name of a day of
  615. the week in the current locale). "weekday" and
  616. "weekend" are also accepted. Defaults to running
  617. the check on any day of the week.
  618. example:
  619. - Saturday
  620. - Sunday
  621. max_duration:
  622. type: integer
  623. description: |
  624. How many seconds to check the repository before
  625. interrupting the check. Useful for splitting a
  626. long-running repository check into multiple
  627. partial checks. Defaults to no interruption. Only
  628. applies to the "repository" check, does not check
  629. the repository index, and is not compatible with a
  630. simultaneous "archives" check or "--repair" flag.
  631. example: 3600
  632. - required:
  633. - name
  634. - count_tolerance_percentage
  635. - data_sample_percentage
  636. - data_tolerance_percentage
  637. additionalProperties: false
  638. properties:
  639. name:
  640. type: string
  641. enum:
  642. - spot
  643. description: |
  644. Name of the consistency check to run:
  645. * "repository" checks the consistency of the
  646. repository.
  647. * "archives" checks all of the archives.
  648. * "data" verifies the integrity of the data
  649. within the archives and implies the "archives"
  650. check as well.
  651. * "spot" checks that some percentage of source
  652. files are found in the most recent archive (with
  653. identical contents).
  654. * "extract" does an extraction dry-run of the
  655. most recent archive.
  656. * See "skip_actions" for disabling checks
  657. altogether.
  658. example: repository
  659. frequency:
  660. type: string
  661. description: |
  662. How frequently to run this type of consistency
  663. check (as a best effort). The value is a number
  664. followed by a unit of time. E.g., "2 weeks" to
  665. run this consistency check no more than every
  666. two weeks for a given repository or "1 month" to
  667. run it no more than monthly. Defaults to
  668. "always": running this check every time checks
  669. are run.
  670. example: 2 weeks
  671. only_run_on:
  672. type: array
  673. items:
  674. type: string
  675. description: |
  676. After the "frequency" duration has elapsed, only
  677. run this check if the current day of the week
  678. matches one of these values (the name of a day of
  679. the week in the current locale). "weekday" and
  680. "weekend" are also accepted. Defaults to running
  681. the check on any day of the week.
  682. example:
  683. - Saturday
  684. - Sunday
  685. count_tolerance_percentage:
  686. type: number
  687. description: |
  688. The percentage delta between the source
  689. directories file count and the most recent backup
  690. archive file count that is allowed before the
  691. entire consistency check fails. This can catch
  692. problems like incorrect excludes, inadvertent
  693. deletes, etc. Required (and only valid) for the
  694. "spot" check.
  695. example: 10
  696. data_sample_percentage:
  697. type: number
  698. description: |
  699. The percentage of total files in the source
  700. directories to randomly sample and compare to
  701. their corresponding files in the most recent
  702. backup archive. Required (and only valid) for the
  703. "spot" check.
  704. example: 1
  705. data_tolerance_percentage:
  706. type: number
  707. description: |
  708. The percentage of total files in the source
  709. directories that can fail a spot check comparison
  710. without failing the entire consistency check. This
  711. can catch problems like source files that have
  712. been bulk-changed by malware, backups that have
  713. been tampered with, etc. The value must be lower
  714. than or equal to the "contents_sample_percentage".
  715. Required (and only valid) for the "spot" check.
  716. example: 0.5
  717. xxh64sum_command:
  718. type: string
  719. description: |
  720. Command to use instead of "xxh64sum" to hash
  721. source files, usually found in an OS package named
  722. "xxhash". Do not substitute with a different hash
  723. type (SHA, MD5, etc.) or the check will never
  724. succeed. Only valid for the "spot" check.
  725. example: /usr/local/bin/xxh64sum
  726. description: |
  727. List of one or more consistency checks to run on a periodic basis
  728. (if "frequency" is set) or every time borgmatic runs checks (if
  729. "frequency" is omitted).
  730. check_repositories:
  731. type: array
  732. items:
  733. type: string
  734. description: |
  735. Paths or labels for a subset of the configured "repositories" (see
  736. above) on which to run consistency checks. Handy in case some of
  737. your repositories are very large, and so running consistency checks
  738. on them would take too long. Defaults to running consistency checks
  739. on all configured repositories.
  740. example:
  741. - user@backupserver:sourcehostname.borg
  742. check_last:
  743. type: integer
  744. description: |
  745. Restrict the number of checked archives to the last n. Applies only
  746. to the "archives" check. Defaults to checking all archives.
  747. example: 3
  748. color:
  749. type: boolean
  750. description: |
  751. Apply color to console output. Can be overridden with --no-color
  752. command-line flag. Defaults to true.
  753. example: false
  754. skip_actions:
  755. type: array
  756. items:
  757. type: string
  758. enum:
  759. - repo-create
  760. - transfer
  761. - prune
  762. - compact
  763. - create
  764. - check
  765. - delete
  766. - extract
  767. - config
  768. - export-tar
  769. - mount
  770. - umount
  771. - repo-delete
  772. - restore
  773. - repo-list
  774. - list
  775. - repo-info
  776. - info
  777. - break-lock
  778. - key
  779. - borg
  780. description: |
  781. List of one or more actions to skip running for this configuration
  782. file, even if specified on the command-line (explicitly or
  783. implicitly). This is handy for append-only configurations where you
  784. never want to run "compact" or checkless configuration where you
  785. want to skip "check". Defaults to not skipping any actions.
  786. example:
  787. - compact
  788. before_actions:
  789. type: array
  790. items:
  791. type: string
  792. description: |
  793. List of one or more shell commands or scripts to execute before all
  794. the actions for each repository.
  795. example:
  796. - "echo Starting actions."
  797. before_backup:
  798. type: array
  799. items:
  800. type: string
  801. description: |
  802. List of one or more shell commands or scripts to execute before
  803. creating a backup, run once per repository.
  804. example:
  805. - "echo Starting a backup."
  806. before_prune:
  807. type: array
  808. items:
  809. type: string
  810. description: |
  811. List of one or more shell commands or scripts to execute before
  812. pruning, run once per repository.
  813. example:
  814. - "echo Starting pruning."
  815. before_compact:
  816. type: array
  817. items:
  818. type: string
  819. description: |
  820. List of one or more shell commands or scripts to execute before
  821. compaction, run once per repository.
  822. example:
  823. - "echo Starting compaction."
  824. before_check:
  825. type: array
  826. items:
  827. type: string
  828. description: |
  829. List of one or more shell commands or scripts to execute before
  830. consistency checks, run once per repository.
  831. example:
  832. - "echo Starting checks."
  833. before_extract:
  834. type: array
  835. items:
  836. type: string
  837. description: |
  838. List of one or more shell commands or scripts to execute before
  839. extracting a backup, run once per repository.
  840. example:
  841. - "echo Starting extracting."
  842. after_backup:
  843. type: array
  844. items:
  845. type: string
  846. description: |
  847. List of one or more shell commands or scripts to execute after
  848. creating a backup, run once per repository.
  849. example:
  850. - "echo Finished a backup."
  851. after_compact:
  852. type: array
  853. items:
  854. type: string
  855. description: |
  856. List of one or more shell commands or scripts to execute after
  857. compaction, run once per repository.
  858. example:
  859. - "echo Finished compaction."
  860. after_prune:
  861. type: array
  862. items:
  863. type: string
  864. description: |
  865. List of one or more shell commands or scripts to execute after
  866. pruning, run once per repository.
  867. example:
  868. - "echo Finished pruning."
  869. after_check:
  870. type: array
  871. items:
  872. type: string
  873. description: |
  874. List of one or more shell commands or scripts to execute after
  875. consistency checks, run once per repository.
  876. example:
  877. - "echo Finished checks."
  878. after_extract:
  879. type: array
  880. items:
  881. type: string
  882. description: |
  883. List of one or more shell commands or scripts to execute after
  884. extracting a backup, run once per repository.
  885. example:
  886. - "echo Finished extracting."
  887. after_actions:
  888. type: array
  889. items:
  890. type: string
  891. description: |
  892. List of one or more shell commands or scripts to execute after all
  893. actions for each repository.
  894. example:
  895. - "echo Finished actions."
  896. on_error:
  897. type: array
  898. items:
  899. type: string
  900. description: |
  901. List of one or more shell commands or scripts to execute when an
  902. exception occurs during a "create", "prune", "compact", or "check"
  903. action or an associated before/after hook.
  904. example:
  905. - "echo Error during create/prune/compact/check."
  906. before_everything:
  907. type: array
  908. items:
  909. type: string
  910. description: |
  911. List of one or more shell commands or scripts to execute before
  912. running all actions (if one of them is "create"). These are
  913. collected from all configuration files and then run once before all
  914. of them (prior to all actions).
  915. example:
  916. - "echo Starting actions."
  917. after_everything:
  918. type: array
  919. items:
  920. type: string
  921. description: |
  922. List of one or more shell commands or scripts to execute after
  923. running all actions (if one of them is "create"). These are
  924. collected from all configuration files and then run once after all
  925. of them (after any action).
  926. example:
  927. - "echo Completed actions."
  928. postgresql_databases:
  929. type: array
  930. items:
  931. type: object
  932. required: ['name']
  933. additionalProperties: false
  934. properties:
  935. name:
  936. type: string
  937. description: |
  938. Database name (required if using this hook). Or "all" to
  939. dump all databases on the host. (Also set the "format"
  940. to dump each database to a separate file instead of one
  941. combined file.) Note that using this database hook
  942. implicitly enables both read_special and one_file_system
  943. (see above) to support dump and restore streaming.
  944. example: users
  945. hostname:
  946. type: string
  947. description: |
  948. Database hostname to connect to. Defaults to connecting
  949. via local Unix socket.
  950. example: database.example.org
  951. restore_hostname:
  952. type: string
  953. description: |
  954. Database hostname to restore to. Defaults to the
  955. "hostname" option.
  956. example: database.example.org
  957. port:
  958. type: integer
  959. description: Port to connect to. Defaults to 5432.
  960. example: 5433
  961. restore_port:
  962. type: integer
  963. description: |
  964. Port to restore to. Defaults to the "port" option.
  965. example: 5433
  966. username:
  967. type: string
  968. description: |
  969. Username with which to connect to the database. Defaults
  970. to the username of the current user. You probably want
  971. to specify the "postgres" superuser here when the
  972. database name is "all".
  973. example: dbuser
  974. restore_username:
  975. type: string
  976. description: |
  977. Username with which to restore the database. Defaults to
  978. the "username" option.
  979. example: dbuser
  980. password:
  981. type: string
  982. description: |
  983. Password with which to connect to the database. Omitting
  984. a password will only work if PostgreSQL is configured to
  985. trust the configured username without a password or you
  986. create a ~/.pgpass file.
  987. example: trustsome1
  988. restore_password:
  989. type: string
  990. description: |
  991. Password with which to connect to the restore database.
  992. Defaults to the "password" option.
  993. example: trustsome1
  994. no_owner:
  995. type: boolean
  996. description: |
  997. Do not output commands to set ownership of objects to
  998. match the original database. By default, pg_dump and
  999. pg_restore issue ALTER OWNER or SET SESSION
  1000. AUTHORIZATION statements to set ownership of created
  1001. schema elements. These statements will fail unless the
  1002. initial connection to the database is made by a
  1003. superuser.
  1004. example: true
  1005. format:
  1006. type: string
  1007. enum: ['plain', 'custom', 'directory', 'tar']
  1008. description: |
  1009. Database dump output format. One of "plain", "custom",
  1010. "directory", or "tar". Defaults to "custom" (unlike raw
  1011. pg_dump) for a single database. Or, when database name
  1012. is "all" and format is blank, dumps all databases to a
  1013. single file. But if a format is specified with an "all"
  1014. database name, dumps each database to a separate file of
  1015. that format, allowing more convenient restores of
  1016. individual databases. See the pg_dump documentation for
  1017. more about formats.
  1018. example: directory
  1019. ssl_mode:
  1020. type: string
  1021. enum: ['disable', 'allow', 'prefer',
  1022. 'require', 'verify-ca', 'verify-full']
  1023. description: |
  1024. SSL mode to use to connect to the database server. One
  1025. of "disable", "allow", "prefer", "require", "verify-ca"
  1026. or "verify-full". Defaults to "disable".
  1027. example: require
  1028. ssl_cert:
  1029. type: string
  1030. description: |
  1031. Path to a client certificate.
  1032. example: "/root/.postgresql/postgresql.crt"
  1033. ssl_key:
  1034. type: string
  1035. description: |
  1036. Path to a private client key.
  1037. example: "/root/.postgresql/postgresql.key"
  1038. ssl_root_cert:
  1039. type: string
  1040. description: |
  1041. Path to a root certificate containing a list of trusted
  1042. certificate authorities.
  1043. example: "/root/.postgresql/root.crt"
  1044. ssl_crl:
  1045. type: string
  1046. description: |
  1047. Path to a certificate revocation list.
  1048. example: "/root/.postgresql/root.crl"
  1049. pg_dump_command:
  1050. type: string
  1051. description: |
  1052. Command to use instead of "pg_dump" or "pg_dumpall".
  1053. This can be used to run a specific pg_dump version
  1054. (e.g., one inside a running container). If you run it
  1055. from within a container, make sure to mount your
  1056. host's ".borgmatic" folder into the container using
  1057. the same directory structure. Defaults to "pg_dump"
  1058. for single database dump or "pg_dumpall" to dump all
  1059. databases.
  1060. example: docker exec my_pg_container pg_dump
  1061. pg_restore_command:
  1062. type: string
  1063. description: |
  1064. Command to use instead of "pg_restore". This can be used
  1065. to run a specific pg_restore version (e.g., one inside a
  1066. running container). Defaults to "pg_restore".
  1067. example: docker exec my_pg_container pg_restore
  1068. psql_command:
  1069. type: string
  1070. description: |
  1071. Command to use instead of "psql". This can be used to
  1072. run a specific psql version (e.g., one inside a running
  1073. container). Defaults to "psql".
  1074. example: docker exec my_pg_container psql
  1075. options:
  1076. type: string
  1077. description: |
  1078. Additional pg_dump/pg_dumpall options to pass directly
  1079. to the dump command, without performing any validation
  1080. on them. See pg_dump documentation for details.
  1081. example: --role=someone
  1082. list_options:
  1083. type: string
  1084. description: |
  1085. Additional psql options to pass directly to the psql
  1086. command that lists available databases, without
  1087. performing any validation on them. See psql
  1088. documentation for details.
  1089. example: --role=someone
  1090. restore_options:
  1091. type: string
  1092. description: |
  1093. Additional pg_restore/psql options to pass directly to
  1094. the restore command, without performing any validation
  1095. on them. See pg_restore/psql documentation for details.
  1096. example: --role=someone
  1097. analyze_options:
  1098. type: string
  1099. description: |
  1100. Additional psql options to pass directly to the analyze
  1101. command run after a restore, without performing any
  1102. validation on them. See psql documentation for details.
  1103. example: --role=someone
  1104. description: |
  1105. List of one or more PostgreSQL databases to dump before creating a
  1106. backup, run once per configuration file. The database dumps are
  1107. added to your source directories at runtime and streamed directly
  1108. to Borg. Requires pg_dump/pg_dumpall/pg_restore commands. See
  1109. https://www.postgresql.org/docs/current/app-pgdump.html and
  1110. https://www.postgresql.org/docs/current/libpq-ssl.html for
  1111. details.
  1112. mariadb_databases:
  1113. type: array
  1114. items:
  1115. type: object
  1116. required: ['name']
  1117. additionalProperties: false
  1118. properties:
  1119. name:
  1120. type: string
  1121. description: |
  1122. Database name (required if using this hook). Or "all" to
  1123. dump all databases on the host. Note that using this
  1124. database hook implicitly enables both read_special and
  1125. one_file_system (see above) to support dump and restore
  1126. streaming.
  1127. example: users
  1128. hostname:
  1129. type: string
  1130. description: |
  1131. Database hostname to connect to. Defaults to connecting
  1132. via local Unix socket.
  1133. example: database.example.org
  1134. restore_hostname:
  1135. type: string
  1136. description: |
  1137. Database hostname to restore to. Defaults to the
  1138. "hostname" option.
  1139. example: database.example.org
  1140. port:
  1141. type: integer
  1142. description: Port to connect to. Defaults to 3306.
  1143. example: 3307
  1144. restore_port:
  1145. type: integer
  1146. description: |
  1147. Port to restore to. Defaults to the "port" option.
  1148. example: 5433
  1149. username:
  1150. type: string
  1151. description: |
  1152. Username with which to connect to the database. Defaults
  1153. to the username of the current user.
  1154. example: dbuser
  1155. restore_username:
  1156. type: string
  1157. description: |
  1158. Username with which to restore the database. Defaults to
  1159. the "username" option.
  1160. example: dbuser
  1161. password:
  1162. type: string
  1163. description: |
  1164. Password with which to connect to the database. Omitting
  1165. a password will only work if MariaDB is configured to
  1166. trust the configured username without a password.
  1167. example: trustsome1
  1168. mariadb_dump_command:
  1169. type: string
  1170. description: |
  1171. Command to use instead of "mariadb-dump". This can be
  1172. used to run a specific mariadb_dump version (e.g., one
  1173. inside a running container). If you run it from within
  1174. a container, make sure to mount your host's
  1175. ".borgmatic" folder into the container using the same
  1176. directory structure. Defaults to "mariadb-dump".
  1177. example: docker exec mariadb_container mariadb-dump
  1178. mariadb_command:
  1179. type: string
  1180. description: |
  1181. Command to run instead of "mariadb". This can be used to
  1182. run a specific mariadb version (e.g., one inside a
  1183. running container). Defaults to "mariadb".
  1184. example: docker exec mariadb_container mariadb
  1185. restore_password:
  1186. type: string
  1187. description: |
  1188. Password with which to connect to the restore database.
  1189. Defaults to the "password" option.
  1190. example: trustsome1
  1191. format:
  1192. type: string
  1193. enum: ['sql']
  1194. description: |
  1195. Database dump output format. Currently only "sql" is
  1196. supported. Defaults to "sql" for a single database. Or,
  1197. when database name is "all" and format is blank, dumps
  1198. all databases to a single file. But if a format is
  1199. specified with an "all" database name, dumps each
  1200. database to a separate file of that format, allowing
  1201. more convenient restores of individual databases.
  1202. example: directory
  1203. add_drop_database:
  1204. type: boolean
  1205. description: |
  1206. Use the "--add-drop-database" flag with mariadb-dump,
  1207. causing the database to be dropped right before restore.
  1208. Defaults to true.
  1209. example: false
  1210. options:
  1211. type: string
  1212. description: |
  1213. Additional mariadb-dump options to pass directly to the
  1214. dump command, without performing any validation on them.
  1215. See mariadb-dump documentation for details.
  1216. example: --skip-comments
  1217. list_options:
  1218. type: string
  1219. description: |
  1220. Additional options to pass directly to the mariadb
  1221. command that lists available databases, without
  1222. performing any validation on them. See mariadb command
  1223. documentation for details.
  1224. example: --defaults-extra-file=mariadb.cnf
  1225. restore_options:
  1226. type: string
  1227. description: |
  1228. Additional options to pass directly to the mariadb
  1229. command that restores database dumps, without
  1230. performing any validation on them. See mariadb command
  1231. documentation for details.
  1232. example: --defaults-extra-file=mariadb.cnf
  1233. description: |
  1234. List of one or more MariaDB databases to dump before creating a
  1235. backup, run once per configuration file. The database dumps are
  1236. added to your source directories at runtime and streamed directly
  1237. to Borg. Requires mariadb-dump/mariadb commands. See
  1238. https://mariadb.com/kb/en/library/mysqldump/ for details.
  1239. mysql_databases:
  1240. type: array
  1241. items:
  1242. type: object
  1243. required: ['name']
  1244. additionalProperties: false
  1245. properties:
  1246. name:
  1247. type: string
  1248. description: |
  1249. Database name (required if using this hook). Or "all" to
  1250. dump all databases on the host. Note that using this
  1251. database hook implicitly enables both read_special and
  1252. one_file_system (see above) to support dump and restore
  1253. streaming.
  1254. example: users
  1255. hostname:
  1256. type: string
  1257. description: |
  1258. Database hostname to connect to. Defaults to connecting
  1259. via local Unix socket.
  1260. example: database.example.org
  1261. restore_hostname:
  1262. type: string
  1263. description: |
  1264. Database hostname to restore to. Defaults to the
  1265. "hostname" option.
  1266. example: database.example.org
  1267. port:
  1268. type: integer
  1269. description: Port to connect to. Defaults to 3306.
  1270. example: 3307
  1271. restore_port:
  1272. type: integer
  1273. description: |
  1274. Port to restore to. Defaults to the "port" option.
  1275. example: 5433
  1276. username:
  1277. type: string
  1278. description: |
  1279. Username with which to connect to the database. Defaults
  1280. to the username of the current user.
  1281. example: dbuser
  1282. restore_username:
  1283. type: string
  1284. description: |
  1285. Username with which to restore the database. Defaults to
  1286. the "username" option.
  1287. example: dbuser
  1288. password:
  1289. type: string
  1290. description: |
  1291. Password with which to connect to the database. Omitting
  1292. a password will only work if MySQL is configured to
  1293. trust the configured username without a password.
  1294. example: trustsome1
  1295. restore_password:
  1296. type: string
  1297. description: |
  1298. Password with which to connect to the restore database.
  1299. Defaults to the "password" option.
  1300. example: trustsome1
  1301. mysql_dump_command:
  1302. type: string
  1303. description: |
  1304. Command to use instead of "mysqldump". This can be
  1305. used to run a specific mysql_dump version (e.g., one
  1306. inside a running container). If you run it from within
  1307. a container, make sure to mount your host's
  1308. ".borgmatic" folder into the container using the same
  1309. directory structure. Defaults to "mysqldump".
  1310. example: docker exec mysql_container mysqldump
  1311. mysql_command:
  1312. type: string
  1313. description: |
  1314. Command to run instead of "mysql". This can be used to
  1315. run a specific mysql version (e.g., one inside a running
  1316. container). Defaults to "mysql".
  1317. example: docker exec mysql_container mysql
  1318. format:
  1319. type: string
  1320. enum: ['sql']
  1321. description: |
  1322. Database dump output format. Currently only "sql" is
  1323. supported. Defaults to "sql" for a single database. Or,
  1324. when database name is "all" and format is blank, dumps
  1325. all databases to a single file. But if a format is
  1326. specified with an "all" database name, dumps each
  1327. database to a separate file of that format, allowing
  1328. more convenient restores of individual databases.
  1329. example: directory
  1330. add_drop_database:
  1331. type: boolean
  1332. description: |
  1333. Use the "--add-drop-database" flag with mysqldump,
  1334. causing the database to be dropped right before restore.
  1335. Defaults to true.
  1336. example: false
  1337. options:
  1338. type: string
  1339. description: |
  1340. Additional mysqldump options to pass directly to the
  1341. dump command, without performing any validation on them.
  1342. See mysqldump documentation for details.
  1343. example: --skip-comments
  1344. list_options:
  1345. type: string
  1346. description: |
  1347. Additional options to pass directly to the mysql
  1348. command that lists available databases, without
  1349. performing any validation on them. See mysql command
  1350. documentation for details.
  1351. example: --defaults-extra-file=my.cnf
  1352. restore_options:
  1353. type: string
  1354. description: |
  1355. Additional options to pass directly to the mysql
  1356. command that restores database dumps, without
  1357. performing any validation on them. See mysql command
  1358. documentation for details.
  1359. example: --defaults-extra-file=my.cnf
  1360. description: |
  1361. List of one or more MySQL databases to dump before creating a
  1362. backup, run once per configuration file. The database dumps are
  1363. added to your source directories at runtime and streamed directly
  1364. to Borg. Requires mysqldump/mysql commands. See
  1365. https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html for
  1366. details.
  1367. sqlite_databases:
  1368. type: array
  1369. items:
  1370. type: object
  1371. required: ['path','name']
  1372. additionalProperties: false
  1373. properties:
  1374. name:
  1375. type: string
  1376. description: |
  1377. This is used to tag the database dump file with a name.
  1378. It is not the path to the database file itself. The name
  1379. "all" has no special meaning for SQLite databases.
  1380. example: users
  1381. path:
  1382. type: string
  1383. description: |
  1384. Path to the SQLite database file to dump. If relative,
  1385. it is relative to the current working directory. Note
  1386. that using this database hook implicitly enables both
  1387. read_special and one_file_system (see above) to support
  1388. dump and restore streaming.
  1389. example: /var/lib/sqlite/users.db
  1390. restore_path:
  1391. type: string
  1392. description: |
  1393. Path to the SQLite database file to restore to. Defaults
  1394. to the "path" option.
  1395. example: /var/lib/sqlite/users.db
  1396. mongodb_databases:
  1397. type: array
  1398. items:
  1399. type: object
  1400. required: ['name']
  1401. additionalProperties: false
  1402. properties:
  1403. name:
  1404. type: string
  1405. description: |
  1406. Database name (required if using this hook). Or "all" to
  1407. dump all databases on the host. Note that using this
  1408. database hook implicitly enables both read_special and
  1409. one_file_system (see above) to support dump and restore
  1410. streaming.
  1411. example: users
  1412. hostname:
  1413. type: string
  1414. description: |
  1415. Database hostname to connect to. Defaults to connecting
  1416. to localhost.
  1417. example: database.example.org
  1418. restore_hostname:
  1419. type: string
  1420. description: |
  1421. Database hostname to restore to. Defaults to the
  1422. "hostname" option.
  1423. example: database.example.org
  1424. port:
  1425. type: integer
  1426. description: Port to connect to. Defaults to 27017.
  1427. example: 27018
  1428. restore_port:
  1429. type: integer
  1430. description: |
  1431. Port to restore to. Defaults to the "port" option.
  1432. example: 5433
  1433. username:
  1434. type: string
  1435. description: |
  1436. Username with which to connect to the database. Skip it
  1437. if no authentication is needed.
  1438. example: dbuser
  1439. restore_username:
  1440. type: string
  1441. description: |
  1442. Username with which to restore the database. Defaults to
  1443. the "username" option.
  1444. example: dbuser
  1445. password:
  1446. type: string
  1447. description: |
  1448. Password with which to connect to the database. Skip it
  1449. if no authentication is needed.
  1450. example: trustsome1
  1451. restore_password:
  1452. type: string
  1453. description: |
  1454. Password with which to connect to the restore database.
  1455. Defaults to the "password" option.
  1456. example: trustsome1
  1457. authentication_database:
  1458. type: string
  1459. description: |
  1460. Authentication database where the specified username
  1461. exists. If no authentication database is specified, the
  1462. database provided in "name" is used. If "name" is "all",
  1463. the "admin" database is used.
  1464. example: admin
  1465. format:
  1466. type: string
  1467. enum: ['archive', 'directory']
  1468. description: |
  1469. Database dump output format. One of "archive", or
  1470. "directory". Defaults to "archive". See mongodump
  1471. documentation for details. Note that format is ignored
  1472. when the database name is "all".
  1473. example: directory
  1474. options:
  1475. type: string
  1476. description: |
  1477. Additional mongodump options to pass directly to the
  1478. dump command, without performing any validation on them.
  1479. See mongodump documentation for details.
  1480. example: --dumpDbUsersAndRoles
  1481. restore_options:
  1482. type: string
  1483. description: |
  1484. Additional mongorestore options to pass directly to the
  1485. dump command, without performing any validation on them.
  1486. See mongorestore documentation for details.
  1487. example: --restoreDbUsersAndRoles
  1488. description: |
  1489. List of one or more MongoDB databases to dump before creating a
  1490. backup, run once per configuration file. The database dumps are
  1491. added to your source directories at runtime and streamed directly
  1492. to Borg. Requires mongodump/mongorestore commands. See
  1493. https://docs.mongodb.com/database-tools/mongodump/ and
  1494. https://docs.mongodb.com/database-tools/mongorestore/ for details.
  1495. ntfy:
  1496. type: object
  1497. required: ['topic']
  1498. additionalProperties: false
  1499. properties:
  1500. topic:
  1501. type: string
  1502. description: |
  1503. The topic to publish to. See https://ntfy.sh/docs/publish/
  1504. for details.
  1505. example: topic
  1506. server:
  1507. type: string
  1508. description: |
  1509. The address of your self-hosted ntfy.sh instance.
  1510. example: https://ntfy.your-domain.com
  1511. username:
  1512. type: string
  1513. description: |
  1514. The username used for authentication.
  1515. example: testuser
  1516. password:
  1517. type: string
  1518. description: |
  1519. The password used for authentication.
  1520. example: fakepassword
  1521. access_token:
  1522. type: string
  1523. description: |
  1524. An ntfy access token to authenticate with instead of
  1525. username/password.
  1526. example: tk_AgQdq7mVBoFD37zQVN29RhuMzNIz2
  1527. start:
  1528. type: object
  1529. properties:
  1530. title:
  1531. type: string
  1532. description: |
  1533. The title of the message.
  1534. example: Ping!
  1535. message:
  1536. type: string
  1537. description: |
  1538. The message body to publish.
  1539. example: Your backups have failed.
  1540. priority:
  1541. type: string
  1542. description: |
  1543. The priority to set.
  1544. example: urgent
  1545. tags:
  1546. type: string
  1547. description: |
  1548. Tags to attach to the message.
  1549. example: incoming_envelope
  1550. finish:
  1551. type: object
  1552. properties:
  1553. title:
  1554. type: string
  1555. description: |
  1556. The title of the message.
  1557. example: Ping!
  1558. message:
  1559. type: string
  1560. description: |
  1561. The message body to publish.
  1562. example: Your backups have failed.
  1563. priority:
  1564. type: string
  1565. description: |
  1566. The priority to set.
  1567. example: urgent
  1568. tags:
  1569. type: string
  1570. description: |
  1571. Tags to attach to the message.
  1572. example: incoming_envelope
  1573. fail:
  1574. type: object
  1575. properties:
  1576. title:
  1577. type: string
  1578. description: |
  1579. The title of the message.
  1580. example: Ping!
  1581. message:
  1582. type: string
  1583. description: |
  1584. The message body to publish.
  1585. example: Your backups have failed.
  1586. priority:
  1587. type: string
  1588. description: |
  1589. The priority to set.
  1590. example: urgent
  1591. tags:
  1592. type: string
  1593. description: |
  1594. Tags to attach to the message.
  1595. example: incoming_envelope
  1596. states:
  1597. type: array
  1598. items:
  1599. type: string
  1600. enum:
  1601. - start
  1602. - finish
  1603. - fail
  1604. uniqueItems: true
  1605. description: |
  1606. List of one or more monitoring states to ping for: "start",
  1607. "finish", and/or "fail". Defaults to pinging for failure
  1608. only.
  1609. example:
  1610. - start
  1611. - finish
  1612. pushover:
  1613. type: object
  1614. required: ['token', 'user']
  1615. additionalProperties: false
  1616. properties:
  1617. token:
  1618. type: string
  1619. description: |
  1620. Your application's API token.
  1621. example: 7ms6TXHpTokTou2P6x4SodDeentHRa
  1622. user:
  1623. type: string
  1624. description: |
  1625. Your user/group key (or that of your target user), viewable
  1626. when logged into your dashboard: often referred to as
  1627. USER_KEY in Pushover documentation and code examples.
  1628. example: hwRwoWsXMBWwgrSecfa9EfPey55WSN
  1629. start:
  1630. type: object
  1631. properties:
  1632. message:
  1633. type: string
  1634. description: |
  1635. Message to be sent to the user or group.
  1636. example: A backup job has started.
  1637. priority:
  1638. type: integer
  1639. description: |
  1640. A value of -2, -1, 0 (default), 1 or 2 that
  1641. indicates the message priority.
  1642. example: 0
  1643. expire:
  1644. type: integer
  1645. description: |
  1646. How many seconds your notification will continue
  1647. to be retried (every retry seconds).
  1648. example: 1200
  1649. retry:
  1650. type: integer
  1651. description: |
  1652. The retry parameter specifies how often
  1653. (in seconds) the Pushover servers will send the
  1654. same notification to the user.
  1655. example: 30
  1656. device:
  1657. type: string
  1658. description: |
  1659. The name of one of your devices to send just to
  1660. that device instead of all devices.
  1661. example: pixel8
  1662. html:
  1663. type: integer
  1664. description: |
  1665. Set to 1 to enable HTML parsing of the message. Set
  1666. to 0 for plain text.
  1667. example: 1
  1668. sound:
  1669. type: string
  1670. description: |
  1671. The name of a supported sound to override your
  1672. default sound choice. All options can be found
  1673. here: https://pushover.net/api#sounds
  1674. example: bike
  1675. title:
  1676. type: string
  1677. description: |
  1678. Your message's title, otherwise your app's name is used.
  1679. example: A backup job has started.
  1680. ttl:
  1681. type: integer
  1682. description: |
  1683. The number of seconds that the message will live, before being deleted
  1684. automatically. The ttl parameter is ignored for messages with a priority
  1685. value of 2.
  1686. example: 3600
  1687. url:
  1688. type: string
  1689. description: |
  1690. A supplementary URL to show with your message.
  1691. example: https://pushover.net/apps/xxxxx-borgbackup
  1692. url_title:
  1693. type: string
  1694. description: |
  1695. A title for the URL specified as the url parameter, otherwise just
  1696. the URL is shown.
  1697. example: Pushover Link
  1698. finish:
  1699. type: object
  1700. type: object
  1701. properties:
  1702. message:
  1703. type: string
  1704. description: |
  1705. Message to be sent to the user or group.
  1706. example: A backup job has started.
  1707. priority:
  1708. type: integer
  1709. description: |
  1710. A value of -2, -1, 0 (default), 1 or 2 that
  1711. indicates the message priority.
  1712. example: 0
  1713. expire:
  1714. type: integer
  1715. description: |
  1716. How many seconds your notification will continue
  1717. to be retried (every retry seconds).
  1718. example: 1200
  1719. retry:
  1720. type: integer
  1721. description: |
  1722. The retry parameter specifies how often
  1723. (in seconds) the Pushover servers will send the
  1724. same notification to the user.
  1725. example: 30
  1726. device:
  1727. type: string
  1728. description: |
  1729. The name of one of your devices to send just to
  1730. that device instead of all devices.
  1731. example: pixel8
  1732. html:
  1733. type: integer
  1734. description: |
  1735. Set to 1 to enable HTML parsing of the message. Set
  1736. to 0 for plain text.
  1737. example: 1
  1738. sound:
  1739. type: string
  1740. description: |
  1741. The name of a supported sound to override your
  1742. default sound choice. All options can be found
  1743. here: https://pushover.net/api#sounds
  1744. example: bike
  1745. title:
  1746. type: string
  1747. description: |
  1748. Your message's title, otherwise your app's name is used.
  1749. example: A backup job has started.
  1750. ttl:
  1751. type: integer
  1752. description: |
  1753. The number of seconds that the message will live, before being deleted
  1754. automatically. The ttl parameter is ignored for messages with a priority
  1755. value of 2.
  1756. example: 3600
  1757. url:
  1758. type: string
  1759. description: |
  1760. A supplementary URL to show with your message.
  1761. example: https://pushover.net/apps/xxxxx-borgbackup
  1762. url_title:
  1763. type: string
  1764. description: |
  1765. A title for the URL specified as the url parameter, otherwise just
  1766. the URL is shown.
  1767. example: Pushover Link
  1768. fail:
  1769. type: object
  1770. properties:
  1771. message:
  1772. type: string
  1773. description: |
  1774. Message to be sent to the user or group.
  1775. example: A backup job has started.
  1776. priority:
  1777. type: integer
  1778. description: |
  1779. A value of -2, -1, 0 (default), 1 or 2 that
  1780. indicates the message priority.
  1781. example: 0
  1782. expire:
  1783. type: integer
  1784. description: |
  1785. How many seconds your notification will continue
  1786. to be retried (every retry seconds).
  1787. example: 1200
  1788. retry:
  1789. type: integer
  1790. description: |
  1791. The retry parameter specifies how often
  1792. (in seconds) the Pushover servers will send the
  1793. same notification to the user.
  1794. example: 30
  1795. device:
  1796. type: string
  1797. description: |
  1798. The name of one of your devices to send just to
  1799. that device instead of all devices.
  1800. example: pixel8
  1801. html:
  1802. type: integer
  1803. description: |
  1804. Set to 1 to enable HTML parsing of the message. Set
  1805. to 0 for plain text.
  1806. example: 1
  1807. sound:
  1808. type: string
  1809. description: |
  1810. The name of a supported sound to override your
  1811. default sound choice. All options can be found
  1812. here: https://pushover.net/api#sounds
  1813. example: bike
  1814. title:
  1815. type: string
  1816. description: |
  1817. Your message's title, otherwise your app's name is used.
  1818. example: A backup job has started.
  1819. ttl:
  1820. type: integer
  1821. description: |
  1822. The number of seconds that the message will live, before being deleted
  1823. automatically. The ttl parameter is ignored for messages with a priority
  1824. value of 2.
  1825. example: 3600
  1826. url:
  1827. type: string
  1828. description: |
  1829. A supplementary URL to show with your message.
  1830. example: https://pushover.net/apps/xxxxx-borgbackup
  1831. url_title:
  1832. type: string
  1833. description: |
  1834. A title for the URL specified as the url parameter, otherwise just
  1835. the URL is shown.
  1836. example: Pushover Link
  1837. states:
  1838. type: array
  1839. items:
  1840. type: string
  1841. enum:
  1842. - start
  1843. - finish
  1844. - fail
  1845. uniqueItems: true
  1846. description: |
  1847. List of one or more monitoring states to ping for: "start",
  1848. "finish", and/or "fail". Defaults to pinging for failure
  1849. only.
  1850. example:
  1851. - start
  1852. - finish
  1853. zabbix:
  1854. type: object
  1855. additionalProperties: false
  1856. properties:
  1857. itemid:
  1858. type: integer
  1859. description: |
  1860. The ID of the Zabbix item used for collecting data.
  1861. Unique across the entire Zabbix system.
  1862. example: 55105
  1863. host:
  1864. type: string
  1865. description: |
  1866. Host name where the item is stored. Required if "itemid"
  1867. is not set.
  1868. example: borg-server
  1869. key:
  1870. type: string
  1871. description: |
  1872. Key of the host where the item is stored. Required if
  1873. "itemid" is not set.
  1874. example: borg.status
  1875. server:
  1876. type: string
  1877. description: |
  1878. The address of your Zabbix instance.
  1879. example: https://zabbix.your-domain.com
  1880. username:
  1881. type: string
  1882. description: |
  1883. The username used for authentication. Not needed if using
  1884. an API key.
  1885. example: testuser
  1886. password:
  1887. type: string
  1888. description: |
  1889. The password used for authentication. Not needed if using
  1890. an API key.
  1891. example: fakepassword
  1892. api_key:
  1893. type: string
  1894. description: |
  1895. The API key used for authentication. Not needed if using
  1896. an username/password.
  1897. example: fakekey
  1898. start:
  1899. type: object
  1900. properties:
  1901. value:
  1902. type: ["integer", "string"]
  1903. description: |
  1904. The value to set the item to on start.
  1905. example: STARTED
  1906. finish:
  1907. type: object
  1908. properties:
  1909. value:
  1910. type: ["integer", "string"]
  1911. description: |
  1912. The value to set the item to on finish.
  1913. example: FINISH
  1914. fail:
  1915. type: object
  1916. properties:
  1917. value:
  1918. type: ["integer", "string"]
  1919. description: |
  1920. The value to set the item to on fail.
  1921. example: ERROR
  1922. states:
  1923. type: array
  1924. items:
  1925. type: string
  1926. enum:
  1927. - start
  1928. - finish
  1929. - fail
  1930. uniqueItems: true
  1931. description: |
  1932. List of one or more monitoring states to ping for: "start",
  1933. "finish", and/or "fail". Defaults to pinging for failure
  1934. only.
  1935. example:
  1936. - start
  1937. - finish
  1938. apprise:
  1939. type: object
  1940. required: ['services']
  1941. additionalProperties: false
  1942. properties:
  1943. services:
  1944. type: array
  1945. items:
  1946. type: object
  1947. required:
  1948. - url
  1949. - label
  1950. properties:
  1951. url:
  1952. type: string
  1953. example: "gotify://hostname/token"
  1954. label:
  1955. type: string
  1956. example: gotify
  1957. description: |
  1958. A list of Apprise services to publish to with URLs and
  1959. labels. The labels are used for logging. A full list of
  1960. services and their configuration can be found at
  1961. https://github.com/caronc/apprise/wiki.
  1962. example:
  1963. - url: "kodi://user@hostname"
  1964. label: kodi
  1965. - url: "line://Token@User"
  1966. label: line
  1967. send_logs:
  1968. type: boolean
  1969. description: |
  1970. Send borgmatic logs to Apprise services as part the
  1971. "finish", "fail", and "log" states. Defaults to true.
  1972. example: false
  1973. logs_size_limit:
  1974. type: integer
  1975. description: |
  1976. Number of bytes of borgmatic logs to send to Apprise
  1977. services. Set to 0 to send all logs and disable this
  1978. truncation. Defaults to 1500.
  1979. example: 100000
  1980. start:
  1981. type: object
  1982. required: ['body']
  1983. properties:
  1984. title:
  1985. type: string
  1986. description: |
  1987. Specify the message title. If left unspecified, no
  1988. title is sent.
  1989. example: Ping!
  1990. body:
  1991. type: string
  1992. description: |
  1993. Specify the message body.
  1994. example: Starting backup process.
  1995. finish:
  1996. type: object
  1997. required: ['body']
  1998. properties:
  1999. title:
  2000. type: string
  2001. description: |
  2002. Specify the message title. If left unspecified, no
  2003. title is sent.
  2004. example: Ping!
  2005. body:
  2006. type: string
  2007. description: |
  2008. Specify the message body.
  2009. example: Backups successfully made.
  2010. fail:
  2011. type: object
  2012. required: ['body']
  2013. properties:
  2014. title:
  2015. type: string
  2016. description: |
  2017. Specify the message title. If left unspecified, no
  2018. title is sent.
  2019. example: Ping!
  2020. body:
  2021. type: string
  2022. description: |
  2023. Specify the message body.
  2024. example: Your backups have failed.
  2025. log:
  2026. type: object
  2027. required: ['body']
  2028. properties:
  2029. title:
  2030. type: string
  2031. description: |
  2032. Specify the message title. If left unspecified, no
  2033. title is sent.
  2034. example: Ping!
  2035. body:
  2036. type: string
  2037. description: |
  2038. Specify the message body.
  2039. example: Here is some info about your backups.
  2040. states:
  2041. type: array
  2042. items:
  2043. type: string
  2044. enum:
  2045. - start
  2046. - finish
  2047. - fail
  2048. - log
  2049. uniqueItems: true
  2050. description: |
  2051. List of one or more monitoring states to ping for:
  2052. "start", "finish", "fail", and/or "log". Defaults to
  2053. pinging for failure only. For each selected state,
  2054. corresponding configuration for the message title and body
  2055. should be given. If any is left unspecified, a generic
  2056. message is emitted instead.
  2057. example:
  2058. - start
  2059. - finish
  2060. healthchecks:
  2061. type: object
  2062. required: ['ping_url']
  2063. additionalProperties: false
  2064. properties:
  2065. ping_url:
  2066. type: string
  2067. description: |
  2068. Healthchecks ping URL or UUID to notify when a backup
  2069. begins, ends, errors, or to send only logs.
  2070. example: https://hc-ping.com/your-uuid-here
  2071. verify_tls:
  2072. type: boolean
  2073. description: |
  2074. Verify the TLS certificate of the ping URL host. Defaults to
  2075. true.
  2076. example: false
  2077. send_logs:
  2078. type: boolean
  2079. description: |
  2080. Send borgmatic logs to Healthchecks as part the "finish",
  2081. "fail", and "log" states. Defaults to true.
  2082. example: false
  2083. ping_body_limit:
  2084. type: integer
  2085. description: |
  2086. Number of bytes of borgmatic logs to send to Healthchecks,
  2087. ideally the same as PING_BODY_LIMIT configured on the
  2088. Healthchecks server. Set to 0 to send all logs and disable
  2089. this truncation. Defaults to 100000.
  2090. example: 200000
  2091. states:
  2092. type: array
  2093. items:
  2094. type: string
  2095. enum:
  2096. - start
  2097. - finish
  2098. - fail
  2099. - log
  2100. uniqueItems: true
  2101. description: |
  2102. List of one or more monitoring states to ping for: "start",
  2103. "finish", "fail", and/or "log". Defaults to pinging for all
  2104. states.
  2105. example:
  2106. - finish
  2107. create_slug:
  2108. type: boolean
  2109. description: |
  2110. Create the check if it does not exist. Only works with
  2111. the slug URL scheme (https://hc-ping.com/<ping-key>/<slug>
  2112. as opposed to https://hc-ping.com/<uuid>).
  2113. Defaults to false.
  2114. example: true
  2115. description: |
  2116. Configuration for a monitoring integration with Healthchecks. Create
  2117. an account at https://healthchecks.io (or self-host Healthchecks) if
  2118. you'd like to use this service. See borgmatic monitoring
  2119. documentation for details.
  2120. uptime_kuma:
  2121. type: object
  2122. required: ['push_url']
  2123. additionalProperties: false
  2124. properties:
  2125. push_url:
  2126. type: string
  2127. description: |
  2128. Uptime Kuma push URL without query string (do not include the
  2129. question mark or anything after it).
  2130. example: https://example.uptime.kuma/api/push/abcd1234
  2131. states:
  2132. type: array
  2133. items:
  2134. type: string
  2135. enum:
  2136. - start
  2137. - finish
  2138. - fail
  2139. uniqueItems: true
  2140. description: |
  2141. List of one or more monitoring states to push for: "start",
  2142. "finish", and/or "fail". Defaults to pushing for all
  2143. states.
  2144. example:
  2145. - start
  2146. - finish
  2147. - fail
  2148. description: |
  2149. Configuration for a monitoring integration with Uptime Kuma using
  2150. the Push monitor type.
  2151. See more information here: https://uptime.kuma.pet
  2152. cronitor:
  2153. type: object
  2154. required: ['ping_url']
  2155. additionalProperties: false
  2156. properties:
  2157. ping_url:
  2158. type: string
  2159. description: |
  2160. Cronitor ping URL to notify when a backup begins,
  2161. ends, or errors.
  2162. example: https://cronitor.link/d3x0c1
  2163. description: |
  2164. Configuration for a monitoring integration with Cronitor. Create an
  2165. account at https://cronitor.io if you'd like to use this service.
  2166. See borgmatic monitoring documentation for details.
  2167. pagerduty:
  2168. type: object
  2169. required: ['integration_key']
  2170. additionalProperties: false
  2171. properties:
  2172. integration_key:
  2173. type: string
  2174. description: |
  2175. PagerDuty integration key used to notify PagerDuty
  2176. when a backup errors.
  2177. example: a177cad45bd374409f78906a810a3074
  2178. description: |
  2179. Configuration for a monitoring integration with PagerDuty. Create an
  2180. account at https://www.pagerduty.com if you'd like to use this
  2181. service. See borgmatic monitoring documentation for details.
  2182. cronhub:
  2183. type: object
  2184. required: ['ping_url']
  2185. additionalProperties: false
  2186. properties:
  2187. ping_url:
  2188. type: string
  2189. description: |
  2190. Cronhub ping URL to notify when a backup begins,
  2191. ends, or errors.
  2192. example: https://cronhub.io/ping/1f5e3410-254c-5587
  2193. description: |
  2194. Configuration for a monitoring integration with Cronhub. Create an
  2195. account at https://cronhub.io if you'd like to use this service. See
  2196. borgmatic monitoring documentation for details.
  2197. loki:
  2198. type: object
  2199. required: ['url', 'labels']
  2200. additionalProperties: false
  2201. properties:
  2202. url:
  2203. type: string
  2204. description: |
  2205. Grafana loki log URL to notify when a backup begins,
  2206. ends, or fails.
  2207. example: "http://localhost:3100/loki/api/v1/push"
  2208. labels:
  2209. type: object
  2210. additionalProperties:
  2211. type: string
  2212. description: |
  2213. Allows setting custom labels for the logging stream. At
  2214. least one label is required. "__hostname" gets replaced by
  2215. the machine hostname automatically. "__config" gets replaced
  2216. by the name of the configuration file. "__config_path" gets
  2217. replaced by the full path of the configuration file.
  2218. example:
  2219. app: "borgmatic"
  2220. config: "__config"
  2221. hostname: "__hostname"
  2222. description: |
  2223. Configuration for a monitoring integration with Grafana loki. You
  2224. can send the logs to a self-hosted instance or create an account at
  2225. https://grafana.com/auth/sign-up/create-user. See borgmatic
  2226. monitoring documentation for details.