export-tar.rst.inc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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] NAME FILE [PATH...]
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  12. | | ``NAME`` | specify the archive name |
  13. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  14. | | ``FILE`` | output tar file. "-" to write to stdout instead. |
  15. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  16. | | ``PATH`` | paths to extract; patterns are supported |
  17. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  18. | **options** |
  19. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  20. | | ``--tar-filter`` | filter program to pipe data through |
  21. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  22. | | ``--list`` | output verbose list of items (files, dirs, ...) |
  23. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  24. | | ``--tar-format FMT`` | select tar format: BORG, PAX or GNU |
  25. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  26. | .. class:: borg-common-opt-ref |
  27. | |
  28. | :ref:`common_options` |
  29. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  30. | **Include/Exclude options** |
  31. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  32. | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
  33. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  34. | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
  35. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  36. | | ``--pattern PATTERN`` | include/exclude paths matching PATTERN |
  37. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  38. | | ``--patterns-from PATTERNFILE`` | read include/exclude patterns from PATTERNFILE, one per line |
  39. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  40. | | ``--strip-components NUMBER`` | Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped. |
  41. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  42. .. raw:: html
  43. <script type='text/javascript'>
  44. $(document).ready(function () {
  45. $('.borg-options-table colgroup').remove();
  46. })
  47. </script>
  48. .. only:: latex
  49. NAME
  50. specify the archive name
  51. FILE
  52. output tar file. "-" to write to stdout instead.
  53. PATH
  54. paths to extract; patterns are supported
  55. options
  56. --tar-filter filter program to pipe data through
  57. --list output verbose list of items (files, dirs, ...)
  58. --tar-format FMT select tar format: BORG, PAX or GNU
  59. :ref:`common_options`
  60. |
  61. Include/Exclude options
  62. -e PATTERN, --exclude PATTERN exclude paths matching PATTERN
  63. --exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
  64. --pattern PATTERN include/exclude paths matching PATTERN
  65. --patterns-from PATTERNFILE read include/exclude patterns from PATTERNFILE, one per line
  66. --strip-components NUMBER Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped.
  67. Description
  68. ~~~~~~~~~~~
  69. This command creates a tarball from an archive.
  70. When giving '-' as the output FILE, Borg will write a tar stream to standard output.
  71. By default (``--tar-filter=auto``) Borg will detect whether the FILE should be compressed
  72. based on its file extension and pipe the tarball through an appropriate filter
  73. before writing it to FILE:
  74. - .tar.gz or .tgz: gzip
  75. - .tar.bz2 or .tbz: bzip2
  76. - .tar.xz or .txz: xz
  77. - .tar.zstd or .tar.zst: zstd
  78. - .tar.lz4: lz4
  79. Alternatively, a ``--tar-filter`` program may be explicitly specified. It should
  80. read the uncompressed tar stream from stdin and write a compressed/filtered
  81. tar stream to stdout.
  82. Depending on the ``-tar-format`` option, these formats are created:
  83. +--------------+---------------------------+----------------------------+
  84. | --tar-format | Specification | Metadata |
  85. +--------------+---------------------------+----------------------------+
  86. | BORG | BORG specific, like PAX | all as supported by borg |
  87. +--------------+---------------------------+----------------------------+
  88. | PAX | POSIX.1-2001 (pax) format | GNU + atime/ctime/mtime ns |
  89. | | | + xattrs |
  90. +--------------+---------------------------+----------------------------+
  91. | GNU | GNU tar format | mtime s, no atime/ctime, |
  92. | | | no ACLs/xattrs/bsdflags |
  93. +--------------+---------------------------+----------------------------+
  94. A ``--sparse`` option (as found in borg extract) is not supported.
  95. By default the entire archive is extracted but a subset of files and directories
  96. can be selected by passing a list of ``PATHs`` as arguments.
  97. The file selection can further be restricted by using the ``--exclude`` option.
  98. For more help on include/exclude patterns, see the :ref:`borg_patterns` command output.
  99. ``--progress`` can be slower than no progress display, since it makes one additional
  100. pass over the archive metadata.