borg-placeholders.1 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "BORG-PLACEHOLDERS" "1" "2025-05-22" "" "borg backup tool"
  31. .SH NAME
  32. borg-placeholders \- Details regarding placeholders
  33. .SH DESCRIPTION
  34. .sp
  35. Repository URLs, \fB\-\-name\fP, \fB\-a\fP / \fB\-\-match\-archives\fP, \fB\-\-comment\fP
  36. and \fB\-\-remote\-path\fP values support these placeholders:
  37. .INDENT 0.0
  38. .TP
  39. .B {hostname}
  40. The (short) hostname of the machine.
  41. .TP
  42. .B {fqdn}
  43. The full name of the machine.
  44. .TP
  45. .B {reverse\-fqdn}
  46. The full name of the machine in reverse domain name notation.
  47. .TP
  48. .B {now}
  49. The current local date and time, by default in ISO\-8601 format.
  50. You can also supply your own format string <https://docs.python.org/3.9/library/datetime.html#strftime-and-strptime-behavior>
  51. , e.g. {now:%Y\-%m\-%d_%H:%M:%S}
  52. .TP
  53. .B {utcnow}
  54. The current UTC date and time, by default in ISO\-8601 format.
  55. You can also supply your own format string <https://docs.python.org/3.9/library/datetime.html#strftime-and-strptime-behavior>
  56. , e.g. {utcnow:%Y\-%m\-%d_%H:%M:%S}
  57. .TP
  58. .B {user}
  59. The user name (or UID, if no name is available) of the user running borg.
  60. .TP
  61. .B {pid}
  62. The current process ID.
  63. .TP
  64. .B {borgversion}
  65. The version of borg, e.g.: 1.0.8rc1
  66. .TP
  67. .B {borgmajor}
  68. The version of borg, only the major version, e.g.: 1
  69. .TP
  70. .B {borgminor}
  71. The version of borg, only major and minor version, e.g.: 1.0
  72. .TP
  73. .B {borgpatch}
  74. The version of borg, only major, minor and patch version, e.g.: 1.0.8
  75. .UNINDENT
  76. .sp
  77. If literal curly braces need to be used, double them for escaping:
  78. .INDENT 0.0
  79. .INDENT 3.5
  80. .sp
  81. .EX
  82. borg create \-\-repo /path/to/repo {{literal_text}}
  83. .EE
  84. .UNINDENT
  85. .UNINDENT
  86. .sp
  87. Examples:
  88. .INDENT 0.0
  89. .INDENT 3.5
  90. .sp
  91. .EX
  92. borg create \-\-repo /path/to/repo {hostname}\-{user}\-{utcnow} ...
  93. borg create \-\-repo /path/to/repo {hostname}\-{now:%Y\-%m\-%d_%H:%M:%S%z} ...
  94. borg prune \-a \(aqsh:{hostname}\-*\(aq ...
  95. .EE
  96. .UNINDENT
  97. .UNINDENT
  98. .sp
  99. \fBNOTE:\fP
  100. .INDENT 0.0
  101. .INDENT 3.5
  102. systemd uses a difficult, non\-standard syntax for command lines in unit files (refer to
  103. the \fIsystemd.unit(5)\fP manual page).
  104. .sp
  105. When invoking borg from unit files, pay particular attention to escaping,
  106. especially when using the now/utcnow placeholders, since systemd performs its own
  107. %\-based variable replacement even in quoted text. To avoid interference from systemd,
  108. double all percent signs (\fB{hostname}\-{now:%Y\-%m\-%d_%H:%M:%S}\fP
  109. becomes \fB{hostname}\-{now:%%Y\-%%m\-%%d_%%H:%%M:%%S}\fP).
  110. .UNINDENT
  111. .UNINDENT
  112. .SH AUTHOR
  113. The Borg Collective
  114. .\" Generated by docutils manpage writer.
  115. .