borg-export-tar.1 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "BORG-EXPORT-TAR" "1" "2025-04-18" "" "borg backup tool"
  31. .SH NAME
  32. borg-export-tar \- Export archive contents as a tarball
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] export\-tar [options] ARCHIVE FILE [PATH...]
  36. .SH DESCRIPTION
  37. .sp
  38. This command creates a tarball from an archive.
  39. .sp
  40. When giving \(aq\-\(aq as the output FILE, Borg will write a tar stream to standard output.
  41. .sp
  42. By default (\fB\-\-tar\-filter=auto\fP) Borg will detect whether the FILE should be compressed
  43. based on its file extension and pipe the tarball through an appropriate filter
  44. before writing it to FILE:
  45. .INDENT 0.0
  46. .IP \(bu 2
  47. \&.tar.gz or .tgz: gzip
  48. .IP \(bu 2
  49. \&.tar.bz2 or .tbz: bzip2
  50. .IP \(bu 2
  51. \&.tar.xz or .txz: xz
  52. .IP \(bu 2
  53. \&.tar.zstd or .tar.zst: zstd
  54. .IP \(bu 2
  55. \&.tar.lz4: lz4
  56. .UNINDENT
  57. .sp
  58. Alternatively, a \fB\-\-tar\-filter\fP program may be explicitly specified. It should
  59. read the uncompressed tar stream from stdin and write a compressed/filtered
  60. tar stream to stdout.
  61. .sp
  62. The generated tarball uses the GNU tar format.
  63. .sp
  64. export\-tar is a lossy conversion:
  65. BSD flags, ACLs, extended attributes (xattrs), atime and ctime are not exported.
  66. Timestamp resolution is limited to whole seconds, not the nanosecond resolution
  67. otherwise supported by Borg.
  68. .sp
  69. A \fB\-\-sparse\fP option (as found in borg extract) is not supported.
  70. .sp
  71. By default the entire archive is extracted but a subset of files and directories
  72. can be selected by passing a list of \fBPATHs\fP as arguments.
  73. The file selection can further be restricted by using the \fB\-\-exclude\fP option.
  74. .sp
  75. For more help on include/exclude patterns, see the \fIborg_patterns\fP command output.
  76. .sp
  77. \fB\-\-progress\fP can be slower than no progress display, since it makes one additional
  78. pass over the archive metadata.
  79. .SH OPTIONS
  80. .sp
  81. See \fIborg\-common(1)\fP for common options of Borg commands.
  82. .SS arguments
  83. .INDENT 0.0
  84. .TP
  85. .B ARCHIVE
  86. archive to export
  87. .TP
  88. .B FILE
  89. output tar file. \(dq\-\(dq to write to stdout instead.
  90. .TP
  91. .B PATH
  92. paths to extract; patterns are supported
  93. .UNINDENT
  94. .SS options
  95. .INDENT 0.0
  96. .TP
  97. .B \-\-tar\-filter
  98. filter program to pipe data through
  99. .TP
  100. .B \-\-list
  101. output verbose list of items (files, dirs, ...)
  102. .UNINDENT
  103. .SS Include/Exclude options
  104. .INDENT 0.0
  105. .TP
  106. .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
  107. exclude paths matching PATTERN
  108. .TP
  109. .BI \-\-exclude\-from \ EXCLUDEFILE
  110. read exclude patterns from EXCLUDEFILE, one per line
  111. .TP
  112. .BI \-\-pattern \ PATTERN
  113. include/exclude paths matching PATTERN
  114. .TP
  115. .BI \-\-patterns\-from \ PATTERNFILE
  116. read include/exclude patterns from PATTERNFILE, one per line
  117. .TP
  118. .BI \-\-strip\-components \ NUMBER
  119. Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped.
  120. .UNINDENT
  121. .SH EXAMPLES
  122. .INDENT 0.0
  123. .INDENT 3.5
  124. .sp
  125. .EX
  126. # export as uncompressed tar
  127. $ borg export\-tar /path/to/repo::Monday Monday.tar
  128. # exclude some types, compress using gzip
  129. $ borg export\-tar /path/to/repo::Monday Monday.tar.gz \-\-exclude \(aq*.so\(aq
  130. # use higher compression level with gzip
  131. $ borg export\-tar \-\-tar\-filter=\(dqgzip \-9\(dq testrepo::linux Monday.tar.gz
  132. # export a tar, but instead of storing it on disk,
  133. # upload it to a remote site using curl.
  134. $ borg export\-tar /path/to/repo::Monday \- | curl \-\-data\-binary @\- https://somewhere/to/POST
  135. # remote extraction via \(dqtarpipe\(dq
  136. $ borg export\-tar /path/to/repo::Monday \- | ssh somewhere \(dqcd extracted; tar x\(dq
  137. .EE
  138. .UNINDENT
  139. .UNINDENT
  140. .SH SEE ALSO
  141. .sp
  142. \fIborg\-common(1)\fP
  143. .SH AUTHOR
  144. The Borg Collective
  145. .\" Generated by docutils manpage writer.
  146. .