extract.rst.inc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_extract:
  3. borg extract
  4. ------------
  5. .. code-block:: none
  6. borg [common options] extract [options] NAME [PATH...]
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  12. | | ``NAME`` | specify the archive name |
  13. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  14. | | ``PATH`` | paths to extract; patterns are supported |
  15. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  16. | **options** |
  17. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  18. | | ``--list`` | output verbose list of items (files, dirs, ...) |
  19. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  20. | | ``-n``, ``--dry-run`` | do not actually change any files |
  21. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  22. | | ``--numeric-ids`` | only obey numeric user and group identifiers |
  23. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  24. | | ``--noflags`` | do not extract/set flags (e.g. NODUMP, IMMUTABLE) |
  25. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  26. | | ``--noacls`` | do not extract/set ACLs |
  27. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  28. | | ``--noxattrs`` | do not extract/set xattrs |
  29. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  30. | | ``--stdout`` | write all extracted data to stdout |
  31. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  32. | | ``--sparse`` | create holes in output sparse file from all-zero chunks |
  33. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  34. | .. class:: borg-common-opt-ref |
  35. | |
  36. | :ref:`common_options` |
  37. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  38. | **Exclusion options** |
  39. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  40. | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
  41. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  42. | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
  43. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  44. | | ``--pattern PATTERN`` | include/exclude paths matching PATTERN |
  45. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  46. | | ``--patterns-from PATTERNFILE`` | read include/exclude patterns from PATTERNFILE, one per line |
  47. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  48. | | ``--strip-components NUMBER`` | Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped. |
  49. +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
  50. .. raw:: html
  51. <script type='text/javascript'>
  52. $(document).ready(function () {
  53. $('.borg-options-table colgroup').remove();
  54. })
  55. </script>
  56. .. only:: latex
  57. NAME
  58. specify the archive name
  59. PATH
  60. paths to extract; patterns are supported
  61. options
  62. --list output verbose list of items (files, dirs, ...)
  63. -n, --dry-run do not actually change any files
  64. --numeric-ids only obey numeric user and group identifiers
  65. --noflags do not extract/set flags (e.g. NODUMP, IMMUTABLE)
  66. --noacls do not extract/set ACLs
  67. --noxattrs do not extract/set xattrs
  68. --stdout write all extracted data to stdout
  69. --sparse create holes in output sparse file from all-zero chunks
  70. :ref:`common_options`
  71. |
  72. Exclusion options
  73. -e PATTERN, --exclude PATTERN exclude paths matching PATTERN
  74. --exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
  75. --pattern PATTERN include/exclude paths matching PATTERN
  76. --patterns-from PATTERNFILE read include/exclude patterns from PATTERNFILE, one per line
  77. --strip-components NUMBER Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped.
  78. Description
  79. ~~~~~~~~~~~
  80. This command extracts the contents of an archive. By default the entire
  81. archive is extracted but a subset of files and directories can be selected
  82. by passing a list of ``PATHs`` as arguments. The file selection can further
  83. be restricted by using the ``--exclude`` option.
  84. For more help on include/exclude patterns, see the :ref:`borg_patterns` command output.
  85. By using ``--dry-run``, you can do all extraction steps except actually writing the
  86. output data: reading metadata and data chunks from the repo, checking the hash/hmac,
  87. decrypting, decompressing.
  88. ``--progress`` can be slower than no progress display, since it makes one additional
  89. pass over the archive metadata.
  90. .. note::
  91. Currently, extract always writes into the current working directory ("."),
  92. so make sure you ``cd`` to the right place before calling ``borg extract``.
  93. When parent directories are not extracted (because of using file/directory selection
  94. or any other reason), borg can not restore parent directories' metadata, e.g. owner,
  95. group, permission, etc.