1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 17:57:59 +00:00
borg/docs/man/borg-placeholders.1

115 lines
2.8 KiB
Groff
Raw Normal View History

2017-02-05 13:22:06 +00:00
.\" Man page generated from reStructuredText.
.
2017-06-18 10:13:28 +00:00
.TH BORG-PLACEHOLDERS 1 "2017-06-18" "" "borg backup tool"
2017-02-05 13:22:06 +00:00
.SH NAME
borg-placeholders \- Details regarding placeholders
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH DESCRIPTION
.sp
2017-06-18 10:13:28 +00:00
Repository (or Archive) URLs, \fB\-\-prefix\fP and \fB\-\-remote\-path\fP values support these
2017-02-05 13:22:06 +00:00
placeholders:
.INDENT 0.0
2017-06-18 10:13:28 +00:00
.TP
.B {hostname}
2017-02-05 13:22:06 +00:00
The (short) hostname of the machine.
2017-06-18 10:13:28 +00:00
.TP
.B {fqdn}
2017-02-05 13:22:06 +00:00
The full name of the machine.
2017-06-18 10:13:28 +00:00
.TP
.B {now}
2017-02-05 13:22:06 +00:00
The current local date and time, by default in ISO\-8601 format.
You can also supply your own \fI\%format string\fP, e.g. {now:%Y\-%m\-%d_%H:%M:%S}
2017-06-18 10:13:28 +00:00
.TP
.B {utcnow}
2017-02-05 13:22:06 +00:00
The current UTC date and time, by default in ISO\-8601 format.
You can also supply your own \fI\%format string\fP, e.g. {utcnow:%Y\-%m\-%d_%H:%M:%S}
2017-06-18 10:13:28 +00:00
.TP
.B {user}
2017-02-05 13:22:06 +00:00
The user name (or UID, if no name is available) of the user running borg.
2017-06-18 10:13:28 +00:00
.TP
.B {pid}
2017-02-05 13:22:06 +00:00
The current process ID.
2017-06-18 10:13:28 +00:00
.TP
.B {borgversion}
2017-02-05 13:22:06 +00:00
The version of borg, e.g.: 1.0.8rc1
2017-06-18 10:13:28 +00:00
.TP
.B {borgmajor}
2017-02-05 13:22:06 +00:00
The version of borg, only the major version, e.g.: 1
2017-06-18 10:13:28 +00:00
.TP
.B {borgminor}
2017-02-05 13:22:06 +00:00
The version of borg, only major and minor version, e.g.: 1.0
2017-06-18 10:13:28 +00:00
.TP
.B {borgpatch}
2017-02-05 13:22:06 +00:00
The version of borg, only major, minor and patch version, e.g.: 1.0.8
.UNINDENT
.sp
2017-04-29 23:32:26 +00:00
If literal curly braces need to be used, double them for escaping:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
borg create /path/to/repo::{{literal_text}}
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
2017-02-05 13:22:06 +00:00
Examples:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
borg create /path/to/repo::{hostname}\-{user}\-{utcnow} ...
borg create /path/to/repo::{hostname}\-{now:%Y\-%m\-%d_%H:%M:%S} ...
borg prune \-\-prefix \(aq{hostname}\-\(aq ...
.ft P
.fi
.UNINDENT
.UNINDENT
2017-06-18 10:13:28 +00:00
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
systemd uses a difficult, non\-standard syntax for command lines in unit files (refer to
the \fIsystemd.unit(5)\fP manual page).
.sp
When invoking borg from unit files, pay particular attention to escaping,
especially when using the now/utcnow placeholders, since systemd performs its own
%\-based variable replacement even in quoted text. To avoid interference from systemd,
double all percent signs (\fB{hostname}\-{now:%Y\-%m\-%d_%H:%M:%S}\fP
becomes \fB{hostname}\-{now:%%Y\-%%m\-%%d_%%H:%%M:%%S}\fP).
.UNINDENT
.UNINDENT
2017-02-05 13:22:06 +00:00
.SH AUTHOR
The Borg Collective
.\" Generated by docutils manpage writer.
.