borg-export-tar.1 4.1 KB

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