2017-02-05 13:22:06 +00:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.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
|
|
|
|
..
|
2023-02-26 20:30:54 +00:00
|
|
|
.TH "BORG-EXTRACT" 1 "2023-02-26" "" "borg backup tool"
|
2022-06-23 23:19:19 +00:00
|
|
|
.SH NAME
|
|
|
|
borg-extract \- Extract archive contents
|
2017-02-05 13:22:06 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.sp
|
2022-06-23 23:19:19 +00:00
|
|
|
borg [common options] extract [options] NAME [PATH...]
|
2017-02-05 13:22:06 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.sp
|
|
|
|
This command extracts the contents of an archive. By default the entire
|
|
|
|
archive is extracted but a subset of files and directories can be selected
|
|
|
|
by passing a list of \fBPATHs\fP as arguments. The file selection can further
|
|
|
|
be restricted by using the \fB\-\-exclude\fP option.
|
|
|
|
.sp
|
2022-02-19 17:48:13 +00:00
|
|
|
For more help on include/exclude patterns, see the \fIborg_patterns\fP command output.
|
2017-02-05 13:22:06 +00:00
|
|
|
.sp
|
|
|
|
By using \fB\-\-dry\-run\fP, you can do all extraction steps except actually writing the
|
|
|
|
output data: reading metadata and data chunks from the repo, checking the hash/hmac,
|
|
|
|
decrypting, decompressing.
|
2017-05-17 09:52:48 +00:00
|
|
|
.sp
|
|
|
|
\fB\-\-progress\fP can be slower than no progress display, since it makes one additional
|
|
|
|
pass over the archive metadata.
|
2017-11-25 13:38:04 +00:00
|
|
|
.sp
|
|
|
|
\fBNOTE:\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2022-09-10 14:03:27 +00:00
|
|
|
Currently, extract always writes into the current working directory (\(dq.\(dq),
|
2017-11-25 13:38:04 +00:00
|
|
|
so make sure you \fBcd\fP to the right place before calling \fBborg extract\fP\&.
|
2022-02-05 16:30:40 +00:00
|
|
|
.sp
|
|
|
|
When parent directories are not extracted (because of using file/directory selection
|
|
|
|
or any other reason), borg can not restore parent directories\(aq metadata, e.g. owner,
|
|
|
|
group, permission, etc.
|
2017-11-25 13:38:04 +00:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2017-02-05 13:22:06 +00:00
|
|
|
.SH OPTIONS
|
|
|
|
.sp
|
|
|
|
See \fIborg\-common(1)\fP for common options of Borg commands.
|
|
|
|
.SS arguments
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B NAME
|
|
|
|
specify the archive name
|
2017-02-05 13:22:06 +00:00
|
|
|
.TP
|
|
|
|
.B PATH
|
|
|
|
paths to extract; patterns are supported
|
|
|
|
.UNINDENT
|
2022-11-26 21:23:46 +00:00
|
|
|
.SS options
|
2017-02-05 13:22:06 +00:00
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-list
|
2017-02-05 13:22:06 +00:00
|
|
|
output verbose list of items (files, dirs, ...)
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-n\fP,\fB \-\-dry\-run
|
2017-02-05 13:22:06 +00:00
|
|
|
do not actually change any files
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-numeric\-ids
|
2017-11-25 13:38:04 +00:00
|
|
|
only obey numeric user and group identifiers
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-noflags
|
2020-04-12 17:55:57 +00:00
|
|
|
do not extract/set flags (e.g. NODUMP, IMMUTABLE)
|
2017-11-25 13:38:04 +00:00
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-noacls
|
2021-05-11 20:33:28 +00:00
|
|
|
do not extract/set ACLs
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-noxattrs
|
2021-05-11 20:33:28 +00:00
|
|
|
do not extract/set xattrs
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-stdout
|
2017-11-25 13:38:04 +00:00
|
|
|
write all extracted data to stdout
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-sparse
|
2017-11-25 13:38:04 +00:00
|
|
|
create holes in output sparse file from all\-zero chunks
|
|
|
|
.UNINDENT
|
|
|
|
.SS Exclusion options
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2020-10-04 18:33:08 +00:00
|
|
|
.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
|
2017-02-05 13:22:06 +00:00
|
|
|
exclude paths matching PATTERN
|
|
|
|
.TP
|
|
|
|
.BI \-\-exclude\-from \ EXCLUDEFILE
|
|
|
|
read exclude patterns from EXCLUDEFILE, one per line
|
|
|
|
.TP
|
2017-03-26 23:58:19 +00:00
|
|
|
.BI \-\-pattern \ PATTERN
|
2022-02-05 16:30:40 +00:00
|
|
|
include/exclude paths matching PATTERN
|
2017-03-26 23:58:19 +00:00
|
|
|
.TP
|
|
|
|
.BI \-\-patterns\-from \ PATTERNFILE
|
2022-02-05 16:30:40 +00:00
|
|
|
read include/exclude patterns from PATTERNFILE, one per line
|
2017-03-26 23:58:19 +00:00
|
|
|
.TP
|
2017-02-05 13:22:06 +00:00
|
|
|
.BI \-\-strip\-components \ NUMBER
|
2017-11-25 13:38:04 +00:00
|
|
|
Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped.
|
2017-02-05 13:22:06 +00:00
|
|
|
.UNINDENT
|
|
|
|
.SH EXAMPLES
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
# Extract entire archive
|
2022-06-23 23:19:19 +00:00
|
|
|
$ borg extract my\-files
|
2017-02-05 13:22:06 +00:00
|
|
|
|
|
|
|
# Extract entire archive and list files while processing
|
2022-06-23 23:19:19 +00:00
|
|
|
$ borg extract \-\-list my\-files
|
2017-02-05 13:22:06 +00:00
|
|
|
|
|
|
|
# Verify whether an archive could be successfully extracted, but do not write files to disk
|
2022-06-23 23:19:19 +00:00
|
|
|
$ borg extract \-\-dry\-run my\-files
|
2017-02-05 13:22:06 +00:00
|
|
|
|
2022-09-10 14:03:27 +00:00
|
|
|
# Extract the \(dqsrc\(dq directory
|
2022-06-23 23:19:19 +00:00
|
|
|
$ borg extract my\-files home/USERNAME/src
|
2017-02-05 13:22:06 +00:00
|
|
|
|
2022-09-10 14:03:27 +00:00
|
|
|
# Extract the \(dqsrc\(dq directory but exclude object files
|
2022-06-23 23:19:19 +00:00
|
|
|
$ borg extract my\-files home/USERNAME/src \-\-exclude \(aq*.o\(aq
|
2017-02-05 13:22:06 +00:00
|
|
|
|
|
|
|
# Restore a raw device (must not be active/in use/mounted at that time)
|
2022-06-23 23:19:19 +00:00
|
|
|
$ borg extract \-\-stdout my\-sdx | dd of=/dev/sdx bs=10M
|
2017-02-05 13:22:06 +00:00
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.SH SEE ALSO
|
|
|
|
.sp
|
|
|
|
\fIborg\-common(1)\fP, \fIborg\-mount(1)\fP
|
|
|
|
.SH AUTHOR
|
|
|
|
The Borg Collective
|
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|