extract.rst.inc 10 KB

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