borg-export-tar.1 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-EXPORT-TAR 1 "2017-05-17" "" "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 (\-\-tar\-filter=auto) 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 \-\-tar\-filter 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 \-\-sparse 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. .TP
  99. .BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
  100. exclude paths matching PATTERN
  101. .TP
  102. .BI \-\-exclude\-from \ EXCLUDEFILE
  103. read exclude patterns from EXCLUDEFILE, one per line
  104. .TP
  105. .BI \-\-pattern \ PATTERN
  106. include/exclude paths matching PATTERN
  107. .TP
  108. .BI \-\-patterns\-from \ PATTERNFILE
  109. read include/exclude patterns from PATTERNFILE, one per line
  110. .TP
  111. .BI \-\-strip\-components \ NUMBER
  112. Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped.
  113. .UNINDENT
  114. .SH EXAMPLES
  115. .INDENT 0.0
  116. .INDENT 3.5
  117. .sp
  118. .nf
  119. .ft C
  120. # export as uncompressed tar
  121. $ borg export\-tar /path/to/repo::Monday Monday.tar
  122. # exclude some types, compress using gzip
  123. $ borg export\-tar /path/to/repo::Monday Monday.tar.gz \-\-exclude \(aq*.so\(aq
  124. # use higher compression level with gzip
  125. $ borg export\-tar testrepo::linux \-\-tar\-filter="gzip \-9" Monday.tar.gz
  126. # export a gzipped tar, but instead of storing it on disk,
  127. # upload it to a remote site using curl.
  128. $ borg export\-tar ... \-\-tar\-filter="gzip" \- | curl \-\-data\-binary @\- https://somewhere/to/POST
  129. .ft P
  130. .fi
  131. .UNINDENT
  132. .UNINDENT
  133. .SH SEE ALSO
  134. .sp
  135. \fIborg\-common(1)\fP
  136. .SH AUTHOR
  137. The Borg Collective
  138. .\" Generated by docutils manpage writer.
  139. .