.\" Man page generated from reStructuredText. . .TH BORG-EXTRACT 1 "2017-02-05" "" "borg backup tool" .SH NAME borg-extract \- Extract archive contents . .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 SYNOPSIS .sp borg extract ARCHIVE PATH .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 See the output of the "borg help patterns" command for more help on exclude patterns. .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. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. .SS arguments .INDENT 0.0 .TP .B ARCHIVE archive to extract .TP .B PATH paths to extract; patterns are supported .UNINDENT .SS optional arguments .INDENT 0.0 .TP .B \-p\fP,\fB \-\-progress show progress while extracting (may be slower) .TP .B \-\-list output verbose list of items (files, dirs, ...) .TP .B \-n\fP,\fB \-\-dry\-run do not actually change any files .TP .BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN exclude paths matching PATTERN .TP .BI \-\-exclude\-from \ EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line .TP .B \-\-numeric\-owner only obey numeric user and group identifiers .TP .BI \-\-strip\-components \ NUMBER Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. .TP .B \-\-stdout write all extracted data to stdout .TP .B \-\-sparse create holes in output sparse file from all\-zero chunks .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Extract entire archive $ borg extract /path/to/repo::my\-files # Extract entire archive and list files while processing $ borg extract \-\-list /path/to/repo::my\-files # Verify whether an archive could be successfully extracted, but do not write files to disk $ borg extract \-\-dry\-run /path/to/repo::my\-files # Extract the "src" directory $ borg extract /path/to/repo::my\-files home/USERNAME/src # Extract the "src" directory but exclude object files $ borg extract /path/to/repo::my\-files home/USERNAME/src \-\-exclude \(aq*.o\(aq # Restore a raw device (must not be active/in use/mounted at that time) $ borg extract \-\-stdout /path/to/repo::my\-sdx | dd of=/dev/sdx bs=10M .ft P .fi .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 Currently, extract always writes into the current working directory ("."), so make sure you \fBcd\fP to the right place before calling \fBborg extract\fP\&. .UNINDENT .UNINDENT .SH SEE ALSO .sp \fIborg\-common(1)\fP, \fIborg\-mount(1)\fP .SH AUTHOR The Borg Collective .\" Generated by docutils manpage writer. .