schema.yaml 117 KB

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