borg-placeholders.1 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-PLACEHOLDERS 1 "2017-06-18" "" "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 {now}
  46. The current local date and time, by default in ISO\-8601 format.
  47. You can also supply your own \fI\%format string\fP, e.g. {now:%Y\-%m\-%d_%H:%M:%S}
  48. .TP
  49. .B {utcnow}
  50. The current UTC date and time, by default in ISO\-8601 format.
  51. You can also supply your own \fI\%format string\fP, e.g. {utcnow:%Y\-%m\-%d_%H:%M:%S}
  52. .TP
  53. .B {user}
  54. The user name (or UID, if no name is available) of the user running borg.
  55. .TP
  56. .B {pid}
  57. The current process ID.
  58. .TP
  59. .B {borgversion}
  60. The version of borg, e.g.: 1.0.8rc1
  61. .TP
  62. .B {borgmajor}
  63. The version of borg, only the major version, e.g.: 1
  64. .TP
  65. .B {borgminor}
  66. The version of borg, only major and minor version, e.g.: 1.0
  67. .TP
  68. .B {borgpatch}
  69. The version of borg, only major, minor and patch version, e.g.: 1.0.8
  70. .UNINDENT
  71. .sp
  72. If literal curly braces need to be used, double them for escaping:
  73. .INDENT 0.0
  74. .INDENT 3.5
  75. .sp
  76. .nf
  77. .ft C
  78. borg create /path/to/repo::{{literal_text}}
  79. .ft P
  80. .fi
  81. .UNINDENT
  82. .UNINDENT
  83. .sp
  84. Examples:
  85. .INDENT 0.0
  86. .INDENT 3.5
  87. .sp
  88. .nf
  89. .ft C
  90. borg create /path/to/repo::{hostname}\-{user}\-{utcnow} ...
  91. borg create /path/to/repo::{hostname}\-{now:%Y\-%m\-%d_%H:%M:%S} ...
  92. borg prune \-\-prefix \(aq{hostname}\-\(aq ...
  93. .ft P
  94. .fi
  95. .UNINDENT
  96. .UNINDENT
  97. .sp
  98. \fBNOTE:\fP
  99. .INDENT 0.0
  100. .INDENT 3.5
  101. systemd uses a difficult, non\-standard syntax for command lines in unit files (refer to
  102. the \fIsystemd.unit(5)\fP manual page).
  103. .sp
  104. When invoking borg from unit files, pay particular attention to escaping,
  105. especially when using the now/utcnow placeholders, since systemd performs its own
  106. %\-based variable replacement even in quoted text. To avoid interference from systemd,
  107. double all percent signs (\fB{hostname}\-{now:%Y\-%m\-%d_%H:%M:%S}\fP
  108. becomes \fB{hostname}\-{now:%%Y\-%%m\-%%d_%%H:%%M:%%S}\fP).
  109. .UNINDENT
  110. .UNINDENT
  111. .SH AUTHOR
  112. The Borg Collective
  113. .\" Generated by docutils manpage writer.
  114. .