list.rst.inc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. REPOSITORY_OR_ARCHIVE
  8. repository/archive to list contents of
  9. PATH
  10. paths to list; patterns are supported
  11. optional arguments
  12. --short only print file/directory names, nothing else
  13. --format, --list-format specify format for file listing
  14. (default: "{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NL}")
  15. --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.
  16. --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.
  17. .. class:: borg-common-opt-ref
  18. :ref:`common_options`
  19. filters
  20. -P, --prefix only consider archive names starting with this prefix.
  21. -a, --glob-archives only consider archive names matching the glob. sh: rules apply, see "borg help patterns". ``--prefix`` and ``--glob-archives`` are mutually exclusive.
  22. --sort-by Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  23. --first N consider first N archives after other filters were applied
  24. --last N consider last N archives after other filters were applied
  25. Exclusion options
  26. -e PATTERN, --exclude PATTERN exclude paths matching PATTERN
  27. --exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
  28. --exclude-caches exclude directories that contain a CACHEDIR.TAG file (http://www.brynosaurus.com/cachedir/spec.html)
  29. --exclude-if-present NAME exclude directories that are tagged by containing a filesystem object with the given NAME
  30. --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
  31. --pattern PATTERN experimental: include/exclude paths matching PATTERN
  32. --patterns-from PATTERNFILE experimental: read include/exclude patterns from PATTERNFILE, one per line
  33. Description
  34. ~~~~~~~~~~~
  35. This command lists the contents of a repository or an archive.
  36. See the "borg help patterns" command for more help on exclude patterns.
  37. .. man NOTES
  38. The following keys are available for ``--format``:
  39. - NEWLINE: OS dependent line separator
  40. - NL: alias of NEWLINE
  41. - NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath
  42. - SPACE
  43. - TAB
  44. - CR
  45. - LF
  46. Keys for listing repository archives:
  47. - archive, name: archive name interpreted as text (might be missing non-text characters, see barchive)
  48. - barchive: verbatim archive name, can contain any character except NUL
  49. - time: time of creation of the archive
  50. - id: internal ID of the archive
  51. Keys for listing archive files:
  52. - type
  53. - mode
  54. - uid
  55. - gid
  56. - user
  57. - group
  58. - path: path interpreted as text (might be missing non-text characters, see bpath)
  59. - bpath: verbatim POSIX path, can contain any character except NUL
  60. - source: link target for links (identical to linktarget)
  61. - linktarget
  62. - flags
  63. - size
  64. - csize: compressed size
  65. - dsize: deduplicated size
  66. - dcsize: deduplicated compressed size
  67. - num_chunks: number of chunks in this file
  68. - unique_chunks: number of unique chunks in this file
  69. - mtime
  70. - ctime
  71. - atime
  72. - isomtime
  73. - isoctime
  74. - isoatime
  75. - md5
  76. - sha1
  77. - sha224
  78. - sha256
  79. - sha384
  80. - sha512
  81. - archiveid
  82. - archivename
  83. - extra: prepends {source} with " -> " for soft links and " link to " for hard links
  84. - health: either "healthy" (file ok) or "broken" (if file has all-zero replacement chunks)