borg-list.1 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "BORG-LIST" "1" "2025-05-05" "" "borg backup tool"
  31. .SH NAME
  32. borg-list \- List archive contents
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] list [options] NAME [PATH...]
  36. .SH DESCRIPTION
  37. .sp
  38. This command lists the contents of an archive.
  39. .sp
  40. For more help on include/exclude patterns, see the \fIborg_patterns\fP command output.
  41. .SH OPTIONS
  42. .sp
  43. See \fIborg\-common(1)\fP for common options of Borg commands.
  44. .SS arguments
  45. .INDENT 0.0
  46. .TP
  47. .B NAME
  48. specify the archive name
  49. .TP
  50. .B PATH
  51. paths to list; patterns are supported
  52. .UNINDENT
  53. .SS options
  54. .INDENT 0.0
  55. .TP
  56. .B \-\-short
  57. only print file/directory names, nothing else
  58. .TP
  59. .BI \-\-format \ FORMAT
  60. specify format for file listing (default: \(dq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(dq)
  61. .TP
  62. .B \-\-json\-lines
  63. Format output as JSON Lines. The form of \fB\-\-format\fP is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text.
  64. .UNINDENT
  65. .SS Include/Exclude options
  66. .INDENT 0.0
  67. .TP
  68. .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
  69. exclude paths matching PATTERN
  70. .TP
  71. .BI \-\-exclude\-from \ EXCLUDEFILE
  72. read exclude patterns from EXCLUDEFILE, one per line
  73. .TP
  74. .BI \-\-pattern \ PATTERN
  75. include/exclude paths matching PATTERN
  76. .TP
  77. .BI \-\-patterns\-from \ PATTERNFILE
  78. read include/exclude patterns from PATTERNFILE, one per line
  79. .UNINDENT
  80. .SH EXAMPLES
  81. .INDENT 0.0
  82. .INDENT 3.5
  83. .sp
  84. .EX
  85. $ borg list root\-2016\-02\-15
  86. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  87. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  88. \-rwxr\-xr\-x root root 1029624 Thu, 2014\-11\-13 00:08:51 bin/bash
  89. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  90. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  91. \&...
  92. $ borg list root\-2016\-02\-15 \-\-pattern \(dq\- bin/ba*\(dq
  93. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  94. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  95. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  96. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  97. \&...
  98. $ borg list archiveA \-\-format=\(dq{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}\(dq
  99. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 .
  100. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code
  101. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code/myproject
  102. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  103. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  104. \&...
  105. $ borg list archiveA \-\-pattern \(aq+ re:\e.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
  106. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  107. \&...
  108. $ borg list archiveA \-\-pattern \(aq+ re:.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
  109. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  110. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  111. \&...
  112. .EE
  113. .UNINDENT
  114. .UNINDENT
  115. .SH NOTES
  116. .SS The FORMAT specifier syntax
  117. .sp
  118. The \fB\-\-format\fP option uses python\(aqs format string syntax <https://docs.python.org/3.9/library/string.html#formatstrings>
  119. \&.
  120. .sp
  121. Examples:
  122. .INDENT 0.0
  123. .INDENT 3.5
  124. .sp
  125. .EX
  126. $ borg list \-\-format \(aq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(aq ArchiveFoo
  127. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  128. \&...
  129. # {VAR:<NUMBER} \- pad to NUMBER columns left\-aligned.
  130. # {VAR:>NUMBER} \- pad to NUMBER columns right\-aligned.
  131. $ borg list \-\-format \(aq{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}\(aq ArchiveFoo
  132. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  133. \&...
  134. .EE
  135. .UNINDENT
  136. .UNINDENT
  137. .sp
  138. The following keys are always available:
  139. .INDENT 0.0
  140. .IP \(bu 2
  141. NEWLINE: OS dependent line separator
  142. .IP \(bu 2
  143. NL: alias of NEWLINE
  144. .IP \(bu 2
  145. NUL: NUL character for creating print0 / xargs \-0 like output
  146. .IP \(bu 2
  147. SPACE: space character
  148. .IP \(bu 2
  149. TAB: tab character
  150. .IP \(bu 2
  151. CR: carriage return character
  152. .IP \(bu 2
  153. LF: line feed character
  154. .UNINDENT
  155. .sp
  156. Keys available only when listing files in an archive:
  157. .INDENT 0.0
  158. .IP \(bu 2
  159. type: file type (file, dir, symlink, ...)
  160. .IP \(bu 2
  161. mode: file mode (as in stat)
  162. .IP \(bu 2
  163. uid: user id of file owner
  164. .IP \(bu 2
  165. gid: group id of file owner
  166. .IP \(bu 2
  167. user: user name of file owner
  168. .IP \(bu 2
  169. group: group name of file owner
  170. .IP \(bu 2
  171. path: file path
  172. .IP \(bu 2
  173. target: link target for symlinks
  174. .IP \(bu 2
  175. hlid: hard link identity (same if hardlinking same fs object)
  176. .IP \(bu 2
  177. flags: file flags
  178. .IP \(bu 2
  179. size: file size
  180. .IP \(bu 2
  181. num_chunks: number of chunks in this file
  182. .IP \(bu 2
  183. mtime: file modification time
  184. .IP \(bu 2
  185. ctime: file change time
  186. .IP \(bu 2
  187. atime: file access time
  188. .IP \(bu 2
  189. isomtime: file modification time (ISO 8601 format)
  190. .IP \(bu 2
  191. isoctime: file change time (ISO 8601 format)
  192. .IP \(bu 2
  193. isoatime: file access time (ISO 8601 format)
  194. .IP \(bu 2
  195. blake2b
  196. .IP \(bu 2
  197. blake2s
  198. .IP \(bu 2
  199. md5
  200. .IP \(bu 2
  201. sha1
  202. .IP \(bu 2
  203. sha224
  204. .IP \(bu 2
  205. sha256
  206. .IP \(bu 2
  207. sha384
  208. .IP \(bu 2
  209. sha3_224
  210. .IP \(bu 2
  211. sha3_256
  212. .IP \(bu 2
  213. sha3_384
  214. .IP \(bu 2
  215. sha3_512
  216. .IP \(bu 2
  217. sha512
  218. .IP \(bu 2
  219. xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
  220. .IP \(bu 2
  221. archiveid: internal ID of the archive
  222. .IP \(bu 2
  223. archivename: name of the archive
  224. .IP \(bu 2
  225. extra: prepends {target} with \(dq \-> \(dq for soft links and \(dq link to \(dq for hard links
  226. .UNINDENT
  227. .SH SEE ALSO
  228. .sp
  229. \fIborg\-common(1)\fP, \fIborg\-info(1)\fP, \fIborg\-diff(1)\fP, \fIborg\-prune(1)\fP, \fIborg\-patterns(1)\fP, \fIborg\-repo\-list(1)\fP
  230. .SH AUTHOR
  231. The Borg Collective
  232. .\" Generated by docutils manpage writer.
  233. .