'\" t .\" Man page generated from reStructuredText .\" by the Docutils 0.22.4 manpage writer. . . .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 .. .TH "borg-export-tar" "1" "2026-08-29" "" "borg backup tool" .SH Name borg-export-tar \- Export archive contents as a tarball .SH SYNOPSIS .sp borg [common options] export\-tar [options] NAME FILE [PATH...] .SH DESCRIPTION .sp This command creates a tarball from an archive. .sp When giving \(aq\-\(aq as the output FILE, Borg will write a tar stream to standard output. .sp By default (\fB\-\-tar\-filter=auto\fP) Borg will detect whether the FILE should be compressed based on its file extension and pipe the tarball through an appropriate filter before writing it to FILE: .INDENT 0.0 .IP \(bu 2 \&.tar.gz or .tgz: gzip .IP \(bu 2 \&.tar.bz2 or .tbz: bzip2 .IP \(bu 2 \&.tar.xz or .txz: xz .IP \(bu 2 \&.tar.zstd, .tar.zst or .tzst: zstd (in\-process, level 3) .IP \(bu 2 \&.tar.lz4: lz4 .UNINDENT .sp For zstd, Borg compresses in\-process using libzstd instead of piping through an external program (set BORG_ZSTD_MT_WORKERS to use multiple compression threads). The other formats are piped through the respective external filter program. .sp Alternatively, a \fB\-\-tar\-filter\fP program may be explicitly specified. It should read the uncompressed tar stream from stdin and write a compressed/filtered tar stream to stdout. .sp Depending on the \fB\-\-tar\-format\fP option, these formats are created: .TS box center; l|l|l. T{ \-\-tar\-format T} T{ Specification T} T{ Metadata T} _ T{ BORG T} T{ BORG specific, like PAX T} T{ all as supported by borg T} _ T{ PAX T} T{ POSIX.1\-2001 (pax) format T} T{ GNU + atime/ctime/mtime ns + xattrs T} _ T{ GNU T} T{ GNU tar format T} T{ mtime s, no atime/ctime, no ACLs/xattrs/bsdflags T} .TE .sp With \fB\-\-sparse\fP, files whose content contains runs of all\-zero chunks are written as sparse tar members (GNU sparse format 1.0, as GNU tar creates it in POSIX mode), storing only a hole map and the non\-zero data. This requires \fB\-\-tar\-format BORG\fP or \fBPAX\fP\&. Such tarballs can be much smaller for sparse files (e.g. disk images) and extract to sparse files again with GNU tar\(aqs or bsdtar\(aqs sparse support (as well as with \fBborg import\-tar\fP / \fBborg extract \-\-sparse\fP). Notes: hole detection works at the granularity of borg\(aqs content chunks (it does not depend on the original file having been a sparse file \- but some short or unaligned zero runs may be stored literally); sparse\-unaware tar implementations will extract a member as \fBGNUSparseFile.0/\fP containing the raw hole map and data (the same caveat applies to tarballs created by GNU tar); for members needing >= 8 GiB of stored (non\-hole) data, the stored size is base\-256 encoded in the tar header (the GNU/star encoding of big numbers, understood by GNU tar, libarchive/bsdtar and python) \- logical file sizes are unlimited anyway. .sp 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 For more help on include/exclude patterns, see the \fIborg_patterns\fP command output. .sp \fB\-\-progress\fP can be slower than no progress display, since it makes one additional pass over the archive metadata. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. .SS arguments .INDENT 0.0 .TP .B NAME specify the archive name .TP .B FILE output tar file. \(dq\-\(dq to write to stdout instead. .TP .B PATH paths to extract; patterns are supported .UNINDENT .SS options .INDENT 0.0 .TP .B \-\-tar\-filter filter program to pipe data through .TP .B \-\-list output verbose list of items (files, dirs, ...) .TP .BI \-\-tar\-format \ FMT select tar format: BORG, PAX or GNU .TP .B \-\-sparse write sparse tar members (GNU sparse format 1.0) for files containing all\-zero chunks (BORG and PAX formats only) .UNINDENT .SS Include/Exclude options .INDENT 0.0 .TP .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN exclude paths matching PATTERN .TP .BI \-\-exclude\-from \ EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line .TP .BI \-\-pattern \ PATTERN include/exclude paths matching PATTERN .TP .BI \-\-patterns\-from \ PATTERNFILE read include/exclude patterns from PATTERNFILE, one per line .TP .BI \-\-strip\-components \ NUMBER Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped. .UNINDENT .SH SEE ALSO .sp \fIborg\-common(1)\fP .SH Author The Borg Collective .\" End of generated man page.