list.rst.inc 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_list:
  3. borg list
  4. ---------
  5. .. code-block:: none
  6. borg [common options] list [options] REPOSITORY_OR_ARCHIVE PATH
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  12. | | ``REPOSITORY_OR_ARCHIVE`` | repository/archive to list contents of |
  13. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | | ``PATH`` | paths to list; patterns are supported |
  15. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | **optional arguments** |
  17. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | | ``--short`` | only print file/directory names, nothing else |
  19. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | | ``--format``, ``--list-format`` | specify format for file listing (default: "{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NL}") |
  21. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | | ``--json`` | Only valid for listing repository contents. Format output as JSON. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "barchive" key is therefore not available. |
  23. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | | ``--json-lines`` | Only valid for listing archive contents. Format output as JSON Lines. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "bpath" key is therefore not available. |
  25. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | .. class:: borg-common-opt-ref |
  27. | |
  28. | :ref:`common_options` |
  29. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | **filters** |
  31. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | | ``-P``, ``--prefix`` | only consider archive names starting with this prefix. |
  33. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | | ``-a``, ``--glob-archives`` | only consider archive names matching the glob. sh: rules apply, see "borg help patterns". ``--prefix`` and ``--glob-archives`` are mutually exclusive. |
  35. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | | ``--sort-by`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
  37. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | | ``--first N`` | consider first N archives after other filters were applied |
  39. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | | ``--last N`` | consider last N archives after other filters were applied |
  41. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | **Exclusion options** |
  43. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
  45. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
  47. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | | ``--exclude-caches`` | exclude directories that contain a CACHEDIR.TAG file (http://www.brynosaurus.com/cachedir/spec.html) |
  49. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | | ``--exclude-if-present NAME`` | exclude directories that are tagged by containing a filesystem object with the given NAME |
  51. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | | ``--keep-exclude-tags``, ``--keep-tag-files`` | if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive |
  53. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | | ``--pattern PATTERN`` | experimental: include/exclude paths matching PATTERN |
  55. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | | ``--patterns-from PATTERNFILE`` | experimental: read include/exclude patterns from PATTERNFILE, one per line |
  57. +-------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. .. raw:: html
  59. <script type='text/javascript'>
  60. $(document).ready(function () {
  61. $('.borg-options-table colgroup').remove();
  62. })
  63. </script>
  64. .. only:: latex
  65. REPOSITORY_OR_ARCHIVE
  66. repository/archive to list contents of
  67. PATH
  68. paths to list; patterns are supported
  69. optional arguments
  70. --short only print file/directory names, nothing else
  71. --format, --list-format specify format for file listing (default: "{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NL}")
  72. --json Only valid for listing repository contents. Format output as JSON. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "barchive" key is therefore not available.
  73. --json-lines Only valid for listing archive contents. Format output as JSON Lines. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "bpath" key is therefore not available.
  74. :ref:`common_options`
  75. |
  76. filters
  77. -P, --prefix only consider archive names starting with this prefix.
  78. -a, --glob-archives only consider archive names matching the glob. sh: rules apply, see "borg help patterns". ``--prefix`` and ``--glob-archives`` are mutually exclusive.
  79. --sort-by Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  80. --first N consider first N archives after other filters were applied
  81. --last N consider last N archives after other filters were applied
  82. Exclusion options
  83. -e PATTERN, --exclude PATTERN exclude paths matching PATTERN
  84. --exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
  85. --exclude-caches exclude directories that contain a CACHEDIR.TAG file (http://www.brynosaurus.com/cachedir/spec.html)
  86. --exclude-if-present NAME exclude directories that are tagged by containing a filesystem object with the given NAME
  87. --keep-exclude-tags, --keep-tag-files if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive
  88. --pattern PATTERN experimental: include/exclude paths matching PATTERN
  89. --patterns-from PATTERNFILE experimental: read include/exclude patterns from PATTERNFILE, one per line
  90. Description
  91. ~~~~~~~~~~~
  92. This command lists the contents of a repository or an archive.
  93. See the "borg help patterns" command for more help on exclude patterns.
  94. .. man NOTES
  95. The following keys are available for ``--format``:
  96. - NEWLINE: OS dependent line separator
  97. - NL: alias of NEWLINE
  98. - NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath
  99. - SPACE
  100. - TAB
  101. - CR
  102. - LF
  103. Keys for listing repository archives:
  104. - archive, name: archive name interpreted as text (might be missing non-text characters, see barchive)
  105. - barchive: verbatim archive name, can contain any character except NUL
  106. - time: time of creation of the archive
  107. - id: internal ID of the archive
  108. Keys for listing archive files:
  109. - type
  110. - mode
  111. - uid
  112. - gid
  113. - user
  114. - group
  115. - path: path interpreted as text (might be missing non-text characters, see bpath)
  116. - bpath: verbatim POSIX path, can contain any character except NUL
  117. - source: link target for links (identical to linktarget)
  118. - linktarget
  119. - flags
  120. - size
  121. - csize: compressed size
  122. - dsize: deduplicated size
  123. - dcsize: deduplicated compressed size
  124. - num_chunks: number of chunks in this file
  125. - unique_chunks: number of unique chunks in this file
  126. - mtime
  127. - ctime
  128. - atime
  129. - isomtime
  130. - isoctime
  131. - isoatime
  132. - md5
  133. - sha1
  134. - sha224
  135. - sha256
  136. - sha384
  137. - sha512
  138. - archiveid
  139. - archivename
  140. - extra: prepends {source} with " -> " for soft links and " link to " for hard links
  141. - health: either "healthy" (file ok) or "broken" (if file has all-zero replacement chunks)