export-tar.rst.inc 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_export-tar:
  3. borg export-tar
  4. ---------------
  5. .. code-block:: none
  6. borg [common options] export-tar [options] ARCHIVE FILE PATH
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  12. | | ``ARCHIVE`` | archive to export |
  13. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  14. | | ``FILE`` | output tar file. "-" to write to stdout instead. |
  15. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  16. | | ``PATH`` | paths to extract; patterns are supported |
  17. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  18. | **optional arguments** |
  19. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  20. | | ``--tar-filter`` | filter program to pipe data through |
  21. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  22. | | ``--list`` | output verbose list of items (files, dirs, ...) |
  23. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  24. | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
  25. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  26. | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
  27. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  28. | | ``--pattern PATTERN`` | experimental: include/exclude paths matching PATTERN |
  29. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  30. | | ``--patterns-from PATTERNFILE`` | experimental: read include/exclude patterns from PATTERNFILE, one per line |
  31. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  32. | | ``--strip-components NUMBER`` | Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. |
  33. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  34. | .. class:: borg-common-opt-ref |
  35. | |
  36. | :ref:`common_options` |
  37. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------+
  38. .. raw:: html
  39. <script type='text/javascript'>
  40. $(document).ready(function () {
  41. $('.borg-options-table colgroup').remove();
  42. })
  43. </script>
  44. .. only:: latex
  45. ARCHIVE
  46. archive to export
  47. FILE
  48. output tar file. "-" to write to stdout instead.
  49. PATH
  50. paths to extract; patterns are supported
  51. optional arguments
  52. --tar-filter filter program to pipe data through
  53. --list output verbose list of items (files, dirs, ...)
  54. -e PATTERN, --exclude PATTERN exclude paths matching PATTERN
  55. --exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
  56. --pattern PATTERN experimental: include/exclude paths matching PATTERN
  57. --patterns-from PATTERNFILE experimental: read include/exclude patterns from PATTERNFILE, one per line
  58. --strip-components NUMBER Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped.
  59. :ref:`common_options`
  60. |
  61. Description
  62. ~~~~~~~~~~~
  63. This command creates a tarball from an archive.
  64. When giving '-' as the output FILE, Borg will write a tar stream to standard output.
  65. By default (``--tar-filter=auto``) Borg will detect whether the FILE should be compressed
  66. based on its file extension and pipe the tarball through an appropriate filter
  67. before writing it to FILE:
  68. - .tar.gz: gzip
  69. - .tar.bz2: bzip2
  70. - .tar.xz: xz
  71. Alternatively a ``--tar-filter`` program may be explicitly specified. It should
  72. read the uncompressed tar stream from stdin and write a compressed/filtered
  73. tar stream to stdout.
  74. The generated tarball uses the GNU tar format.
  75. export-tar is a lossy conversion:
  76. BSD flags, ACLs, extended attributes (xattrs), atime and ctime are not exported.
  77. Timestamp resolution is limited to whole seconds, not the nanosecond resolution
  78. otherwise supported by Borg.
  79. A ``--sparse`` option (as found in borg extract) is not supported.
  80. By default the entire archive is extracted but a subset of files and directories
  81. can be selected by passing a list of ``PATHs`` as arguments.
  82. The file selection can further be restricted by using the ``--exclude`` option.
  83. See the output of the "borg help patterns" command for more help on exclude patterns.
  84. ``--progress`` can be slower than no progress display, since it makes one additional
  85. pass over the archive metadata.