2
0

borg-placeholders.1 2.9 KB

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