|
@@ -1,3 +1,4 @@
|
|
|
+'\" t
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
.
|
|
|
.
|
|
@@ -27,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
..
|
|
|
-.TH "BORG" 1 "2024-11-16" "" "borg backup tool"
|
|
|
+.TH "BORG" "1" "2025-04-21" "" "borg backup tool"
|
|
|
.SH NAME
|
|
|
borg \- deduplicating and encrypting backup tool
|
|
|
.SH SYNOPSIS
|
|
@@ -58,11 +59,9 @@ Before a backup can be made, a repository has to be initialized:
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo repo\-create \-\-encryption=repokey\-aes\-ocb
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.IP 2. 3
|
|
@@ -71,11 +70,9 @@ Back up the \fB~/src\fP and \fB~/Documents\fP directories into an archive called
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo create docs ~/src ~/Documents
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.IP 3. 3
|
|
@@ -83,11 +80,9 @@ The next day create a new archive using the same archive name:
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo create \-\-stats docs ~/src ~/Documents
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.sp
|
|
@@ -98,8 +93,7 @@ size (the amount of unique data not shared with other archives):
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
Repository: /path/to/repo
|
|
|
Archive name: docs
|
|
|
Archive fingerprint: bcd1b53f9b4991b7afc2b339f851b7ffe3c6d030688936fe4552eccc1877718d
|
|
@@ -110,8 +104,7 @@ Utilization of max. archive size: 0%
|
|
|
Number of files: 699
|
|
|
Original size: 31.14 MB
|
|
|
Deduplicated size: 502 B
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.IP 4. 3
|
|
@@ -119,13 +112,11 @@ List all archives in the repository:
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo repo\-list
|
|
|
docs Sat, 2022\-06\-25 20:21:14 [b80e24d2...b179f298]
|
|
|
docs Sat, 2022\-06\-25 20:21:43 [bcd1b53f...1877718d]
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.IP 5. 3
|
|
@@ -133,14 +124,12 @@ List the contents of the first archive:
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo list aid:b80e24d2
|
|
|
drwxr\-xr\-x user group 0 Mon, 2016\-02\-15 18:22:30 home/user/Documents
|
|
|
\-rw\-r\-\-r\-\- user group 7961 Mon, 2016\-02\-15 18:22:30 home/user/Documents/Important.doc
|
|
|
\&...
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.IP 6. 3
|
|
@@ -148,11 +137,9 @@ Restore the first archive by extracting the files relative to the current direct
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo extract aid:b80e24d2
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.IP 7. 3
|
|
@@ -160,11 +147,9 @@ Delete the first archive (please note that this does \fBnot\fP free repo disk sp
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo delete aid:b80e24d2
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.sp
|
|
@@ -175,11 +160,9 @@ Recover disk space by compacting the segment files in the repo:
|
|
|
.INDENT 3.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
$ borg \-r /path/to/repo compact \-v
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
@@ -203,18 +186,16 @@ in the example), but not in between them:
|
|
|
.INDENT 0.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
borg create \-s \-\-progress archive path # good and preferred
|
|
|
borg create archive path \-s \-\-progress # also works
|
|
|
borg create \-s archive path \-\-progress # works, but ugly
|
|
|
borg create archive \-s \-\-progress path # BAD
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.sp
|
|
|
-This is due to a problem in the argparse module: \fI\%https://bugs.python.org/issue15112\fP
|
|
|
+This is due to a problem in the argparse module: <https://bugs.python.org/issue15112>
|
|
|
.SS Repository URLs
|
|
|
.sp
|
|
|
\fBLocal filesystem\fP (or locally mounted network filesystem):
|
|
@@ -228,7 +209,7 @@ expanded by your shell).
|
|
|
.sp
|
|
|
Note: you may also prepend a \fBfile://\fP to a filesystem path to get URL style.
|
|
|
.sp
|
|
|
-\fBRemote repositories\fP accessed via ssh \fI\%user@host\fP:
|
|
|
+\fBRemote repositories\fP accessed via ssh <user@host> :
|
|
|
.sp
|
|
|
\fBssh://user@host:port//abs/path/to/repo\fP \- absolute path
|
|
|
.sp
|
|
@@ -251,11 +232,9 @@ If you frequently need the same repo URL, it is a good idea to set the
|
|
|
.INDENT 0.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
export BORG_REPO=\(aqssh://user@host:port/rel/path/to/repo\(aq
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.sp
|
|
@@ -285,11 +264,9 @@ If you want to capture the log output to a file, just redirect it:
|
|
|
.INDENT 0.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
-borg create repo::archive myfiles 2>> logfile
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EX
|
|
|
+borg create \-\-repo repo archive myfiles 2>> logfile
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.sp
|
|
@@ -331,9 +308,8 @@ their usage is not recommended as you might miss important information.
|
|
|
.sp
|
|
|
Borg can exit with the following return codes (rc):
|
|
|
.TS
|
|
|
-center;
|
|
|
-|l|l|.
|
|
|
-_
|
|
|
+box center;
|
|
|
+l|l.
|
|
|
T{
|
|
|
Return code
|
|
|
T} T{
|
|
@@ -377,7 +353,6 @@ T{
|
|
|
T} T{
|
|
|
killed by signal N (e.g. 137 == kill \-9)
|
|
|
T}
|
|
|
-_
|
|
|
.TE
|
|
|
.sp
|
|
|
If you use \fB\-\-show\-rc\fP, the return code is also logged at the indicated
|
|
@@ -442,14 +417,15 @@ a unique id based on the MAC address of the network interface. Except if that MA
|
|
|
that case it returns a random value, which is not what we want (because it kills automatic stale lock removal).
|
|
|
So, if you have a all\-zero MAC address or other reasons to control better externally the host id, just set this
|
|
|
environment variable to a unique value. If all your FQDNs are unique, you can just use the FQDN. If not,
|
|
|
-use \fI\%fqdn@uniqueid\fP\&.
|
|
|
+use <fqdn@uniqueid> \&.
|
|
|
.TP
|
|
|
.B BORG_LOCK_WAIT
|
|
|
You can set the default value for the \fB\-\-lock\-wait\fP option with this, so
|
|
|
you do not need to give it as a commandline option.
|
|
|
.TP
|
|
|
.B BORG_LOGGING_CONF
|
|
|
-When set, use the given filename as \fI\%INI\fP\-style logging configuration.
|
|
|
+When set, use the given filename as INI <https://docs.python.org/3/library/logging.config.html#configuration-file-format>
|
|
|
+\-style logging configuration.
|
|
|
A basic example conf can be found at \fBdocs/misc/logging.conf\fP\&.
|
|
|
.TP
|
|
|
.B BORG_RSH
|
|
@@ -534,11 +510,9 @@ from an affected repository (read\-only access):
|
|
|
.INDENT 7.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
-BORG_WORKAROUNDS=authenticated_no_key borg extract repo::archive
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EX
|
|
|
+BORG_WORKAROUNDS=authenticated_no_key borg extract \-\-repo repo archive
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.sp
|
|
@@ -546,11 +520,9 @@ After you have extracted all data you need, you MUST delete the repository:
|
|
|
.INDENT 7.0
|
|
|
.INDENT 3.5
|
|
|
.sp
|
|
|
-.nf
|
|
|
-.ft C
|
|
|
+.EX
|
|
|
BORG_WORKAROUNDS=authenticated_no_key borg delete repo
|
|
|
-.ft P
|
|
|
-.fi
|
|
|
+.EE
|
|
|
.UNINDENT
|
|
|
.UNINDENT
|
|
|
.sp
|
|
@@ -604,26 +576,30 @@ to modify \fBBORG_BASE_DIR\fP: the other paths for cache, config etc. will adapt
|
|
|
.TP
|
|
|
.B BORG_CACHE_DIR
|
|
|
Defaults to \fB$BORG_BASE_DIR/.cache/borg\fP\&. If \fBBORG_BASE_DIR\fP is not explicitly set while
|
|
|
-\fI\%XDG env var\fP \fBXDG_CACHE_HOME\fP is set, then \fB$XDG_CACHE_HOME/borg\fP is being used instead.
|
|
|
+XDG env var <https://specifications.freedesktop.org/basedir-spec/0.6/ar01s03.html>
|
|
|
+ \fBXDG_CACHE_HOME\fP is set, then \fB$XDG_CACHE_HOME/borg\fP is being used instead.
|
|
|
This directory contains the local cache and might need a lot
|
|
|
of space for dealing with big repositories. Make sure you\(aqre aware of the associated
|
|
|
security aspects of the cache location: \fIcache_security\fP
|
|
|
.TP
|
|
|
.B BORG_CONFIG_DIR
|
|
|
Defaults to \fB$BORG_BASE_DIR/.config/borg\fP\&. If \fBBORG_BASE_DIR\fP is not explicitly set while
|
|
|
-\fI\%XDG env var\fP \fBXDG_CONFIG_HOME\fP is set, then \fB$XDG_CONFIG_HOME/borg\fP is being used instead.
|
|
|
+XDG env var <https://specifications.freedesktop.org/basedir-spec/0.6/ar01s03.html>
|
|
|
+ \fBXDG_CONFIG_HOME\fP is set, then \fB$XDG_CONFIG_HOME/borg\fP is being used instead.
|
|
|
This directory contains all borg configuration directories, see the FAQ
|
|
|
for a security advisory about the data in this directory: \fIhome_config_borg\fP
|
|
|
.TP
|
|
|
.B BORG_DATA_DIR
|
|
|
Defaults to \fB$BORG_BASE_DIR/.local/share/borg\fP\&. If \fBBORG_BASE_DIR\fP is not explicitly set while
|
|
|
-\fI\%XDG env var\fP \fBXDG_DATA_HOME\fP is set, then \fB$XDG_DATA_HOME/borg\fP is being used instead.
|
|
|
+XDG env var <https://specifications.freedesktop.org/basedir-spec/0.6/ar01s03.html>
|
|
|
+ \fBXDG_DATA_HOME\fP is set, then \fB$XDG_DATA_HOME/borg\fP is being used instead.
|
|
|
This directory contains all borg data directories, see the FAQ
|
|
|
for a security advisory about the data in this directory: \fIhome_data_borg\fP
|
|
|
.TP
|
|
|
.B BORG_RUNTIME_DIR
|
|
|
Defaults to \fB$BORG_BASE_DIR/.cache/borg\fP\&. If \fBBORG_BASE_DIR\fP is not explicitly set while
|
|
|
-\fI\%XDG env var\fP \fBXDG_RUNTIME_DIR\fP is set, then \fB$XDG_RUNTIME_DIR/borg\fP is being used instead.
|
|
|
+XDG env var <https://specifications.freedesktop.org/basedir-spec/0.6/ar01s03.html>
|
|
|
+ \fBXDG_RUNTIME_DIR\fP is set, then \fB$XDG_RUNTIME_DIR/borg\fP is being used instead.
|
|
|
This directory contains borg runtime files, like e.g. the socket file.
|
|
|
.TP
|
|
|
.B BORG_SECURITY_DIR
|
|
@@ -656,7 +632,8 @@ you need to point to the correct key file matching the repository the command wi
|
|
|
.TP
|
|
|
.B TMPDIR
|
|
|
This is where temporary files are stored (might need a lot of temporary space for some
|
|
|
-operations), see \fI\%tempfile\fP for details.
|
|
|
+operations), see tempfile <https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir>
|
|
|
+ for details.
|
|
|
.UNINDENT
|
|
|
.TP
|
|
|
.B Building:
|
|
@@ -738,23 +715,28 @@ Sometimes slower, due to less sequential / more random access operations.
|
|
|
.SS Units
|
|
|
.sp
|
|
|
To display quantities, Borg takes care of respecting the
|
|
|
-usual conventions of scale. Disk sizes are displayed in \fI\%decimal\fP, using powers of ten (so
|
|
|
-\fBkB\fP means 1000 bytes). For memory usage, \fI\%binary prefixes\fP are used, and are
|
|
|
-indicated using the \fI\%IEC binary prefixes\fP,
|
|
|
+usual conventions of scale. Disk sizes are displayed in decimal <https://en.wikipedia.org/wiki/Decimal>
|
|
|
+, using powers of ten (so
|
|
|
+\fBkB\fP means 1000 bytes). For memory usage, binary prefixes <https://en.wikipedia.org/wiki/Binary_prefix>
|
|
|
+ are used, and are
|
|
|
+indicated using the IEC binary prefixes <https://en.wikipedia.org/wiki/IEC_80000-13#Prefixes_for_binary_multiples>
|
|
|
+,
|
|
|
using powers of two (so \fBKiB\fP means 1024 bytes).
|
|
|
.SS Date and Time
|
|
|
.sp
|
|
|
We format date and time conforming to ISO\-8601, that is: YYYY\-MM\-DD and
|
|
|
HH:MM:SS (24h clock).
|
|
|
.sp
|
|
|
-For more information about that, see: \fI\%https://xkcd.com/1179/\fP
|
|
|
+For more information about that, see: <https://xkcd.com/1179/>
|
|
|
.sp
|
|
|
Unless otherwise noted, we display local date and time.
|
|
|
Internally, we store and process date and time as UTC.
|
|
|
TIMESPAN
|
|
|
.sp
|
|
|
-Some options accept a TIMESPAN parameter, which can be given as a
|
|
|
-number of days (e.g. \fB7d\fP) or months (e.g. \fB12m\fP).
|
|
|
+Some options accept a TIMESPAN parameter, which can be given as a number of
|
|
|
+years (e.g. \fB2y\fP), months (e.g. \fB12m\fP), weeks (e.g. \fB2w\fP),
|
|
|
+days (e.g. \fB7d\fP), hours (e.g. \fB8H\fP), minutes (e.g. \fB30M\fP),
|
|
|
+or seconds (e.g. \fB150S\fP).
|
|
|
.SS Resource Usage
|
|
|
.sp
|
|
|
Borg might use a lot of resources depending on the size of the data set it is dealing with.
|
|
@@ -798,7 +780,7 @@ borg check: the repository check computes the checksums of all chunks
|
|
|
borg delete repo: low CPU usage
|
|
|
.TP
|
|
|
.B CPU (only for client/server operation):
|
|
|
-When using borg in a client/server way with a \fI\%ssh:\-type\fP repo, the ssh
|
|
|
+When using borg in a client/server way with a <ssh:\-type> repo, the ssh
|
|
|
processes used for the transport layer will need some CPU on the client and
|
|
|
on the server due to the crypto they are doing \- esp. if you are pumping
|
|
|
big amounts of data.
|
|
@@ -898,9 +880,8 @@ On some platforms additional features are supported:
|
|
|
.\" Yes/No's are grouped by reason/mechanism/reference.
|
|
|
.
|
|
|
.TS
|
|
|
-center;
|
|
|
-|l|l|l|l|.
|
|
|
-_
|
|
|
+box center;
|
|
|
+l|l|l|l.
|
|
|
T{
|
|
|
Platform
|
|
|
T} T{
|
|
@@ -983,7 +964,6 @@ No
|
|
|
T} T{
|
|
|
No
|
|
|
T}
|
|
|
-_
|
|
|
.TE
|
|
|
.sp
|
|
|
Other Unix\-like operating systems may work as well, but have not been tested at all.
|
|
@@ -1021,15 +1001,15 @@ The BSDs define additional flags.
|
|
|
\fIborg\-compression(1)\fP, \fIborg\-patterns(1)\fP, \fIborg\-placeholders(1)\fP
|
|
|
.INDENT 0.0
|
|
|
.IP \(bu 2
|
|
|
-Main web site \fI\%https://www.borgbackup.org/\fP
|
|
|
+Main web site <https://www.borgbackup.org/>
|
|
|
.IP \(bu 2
|
|
|
-Releases \fI\%https://github.com/borgbackup/borg/releases\fP
|
|
|
+Releases <https://github.com/borgbackup/borg/releases>
|
|
|
.IP \(bu 2
|
|
|
-Changelog \fI\%https://github.com/borgbackup/borg/blob/master/docs/changes.rst\fP
|
|
|
+Changelog <https://github.com/borgbackup/borg/blob/master/docs/changes.rst>
|
|
|
.IP \(bu 2
|
|
|
-GitHub \fI\%https://github.com/borgbackup/borg\fP
|
|
|
+GitHub <https://github.com/borgbackup/borg>
|
|
|
.IP \(bu 2
|
|
|
-Security contact \fI\%https://borgbackup.readthedocs.io/en/latest/support.html#security\-contact\fP
|
|
|
+Security contact <https://borgbackup.readthedocs.io/en/latest/support.html#security\-contact>
|
|
|
.UNINDENT
|
|
|
.SH AUTHOR
|
|
|
The Borg Collective
|