export-tar.rst.inc 9.0 KB

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