borg-export-tar(1)
β¨ borg-export-tar β¨
okay bestie, welcome to borg-export-tar(1) β yes that's the whole manual page name, she's a borg backup tool and she's here to turn your archive into a tarball π
π SYNOPSIS π
borg [common options] export-tar [options] ARCHIVE FILE [PATH...]
like, that's the whole vibe check right there. common options go first, then export-tar does her thing β¨
π DESCRIPTION π
so what does she actually do? this command creates a tarball from an archive. iconic. main character energy fr fr π«Ά
when you pass - as the output FILE, Borg will write a tar stream to standard output. no cap.
by default (--tar-filter=auto), 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:
.tar.gzor.tgz:gzip.tar.bz2or.tbz:bzip2.tar.xzor.txz:xz.tar.zstdor.tar.zst:zstd.tar.lz4:lz4
she reads your extension and just knows. the way that works?? obsessed π
alternatively, a --tar-filter program may be explicitly specified. it should read the uncompressed tar stream from stdin and write a compressed/filtered tar stream to stdout. so like, it's a little pipe girly, you feed her in, she spits out πΈ
the generated tarball uses the GNU tar format. periodt.
β οΈ okay important one: export-tar is a lossy conversion π«’ BSD flags, ACLs, extended attributes (xattrs), atime and ctime are not exported. timestamp resolution is limited to whole seconds, not the nanosecond resolution otherwise supported by Borg. so like, some of the lil details stay home. don't shoot the messenger π
also: a--sparseoption (as found inborg extract) is not supported. she said no π
by default the entire archive is extracted but a subset of files and directories can be selected by passing a list of PATHs as arguments. the file selection can further be restricted by using the --exclude option. like, you can be picky, she supports it π₯°
for more help on include/exclude patterns, see the borg_patterns command output. iykyk.
ngl, --progress can be slower than no progress display, since it makes one additional pass over the archive metadata. worth it for the lil bar though? your call bestie π
π OPTIONS π
see borg-common(1) for common options of Borg commands. (yes, the common ones go hang out over there.)
π¦ arguments
ARCHIVEβ the archive to export. your lil archive babe πFILEβ output tar file."-"to write to stdout instead. dash means straight to stdout, no files harmed π«ΆPATHβ paths to extract; patterns are supported β¨
π options
--tar-filterβ filter program to pipe data through. the middleman. the connector. the -girl πΈ--listβ output verbose list of items (files, dirs, ...) so you can see everything she did π
π Include/Exclude options
-ePATTERN,--excludePATTERN β exclude paths matching PATTERN. not today, sweetie π--exclude-fromEXCLUDEFILE β read exclude patterns from EXCLUDEFILE, one per line β¨--patternPATTERN β include/exclude paths matching PATTERN. she contains multitudes π--patterns-fromPATTERNFILE β read include/exclude patterns from PATTERNFILE, one per line πΈ--strip-componentsNUMBER β Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped. (silently!! she's not gonna make a scene about it π)
π₯ EXAMPLES π₯
okay slay, let's see her in action:
# Export as an uncompressed tar.
$ borg export-tar /path/to/repo::Monday Monday.tar
# Exclude some types; compress using gzip.
$ borg export-tar /path/to/repo::Monday Monday.tar.gz --exclude '*.so'
# Use a higher compression level with gzip.
$ borg export-tar --tar-filter="gzip -9" testrepo::linux Monday.tar.gz
# Export a tar, but instead of storing it on disk,
# upload it to a remote site using curl.
$ borg export-tar /path/to/repo::Monday - | curl --data-binary @- https://somewhere/to/POST
# Remote extraction via "tarpipe".
$ borg export-tar /path/to/repo::Monday - | ssh somewhere "cd extracted; tar x"
the curl one and the ssh "tarpipe" one?? literally the moment she ate and left no crumbs π₯ piping straight into the void is such a power move fr fr π
π SEE ALSO π
π Author π
The Borg Collective
and that's the whole page bestie!! π₯³ source borg backup tool, page dated 2026-07-18, manual page borg-export-tar(1) β go forth and export your tars, you're gonna do amazing πβ¨ππ¦πΈ
π¦ where this page comes from
- alpine 3.24: borgbackup-doc 1.4.5-r0 Β· BSD-3-Clause
- arch rolling: borg 1.4.5-1 Β· BSD
- ubuntu stonking: borgbackup 1.4.5-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms