borg-list.1 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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-19" "" "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. .TP
  65. .BI \-\-depth \ N
  66. only list files up to the specified directory level depth
  67. .UNINDENT
  68. .SS Include/Exclude options
  69. .INDENT 0.0
  70. .TP
  71. .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
  72. exclude paths matching PATTERN
  73. .TP
  74. .BI \-\-exclude\-from \ EXCLUDEFILE
  75. read exclude patterns from EXCLUDEFILE, one per line
  76. .TP
  77. .BI \-\-pattern \ PATTERN
  78. include/exclude paths matching PATTERN
  79. .TP
  80. .BI \-\-patterns\-from \ PATTERNFILE
  81. read include/exclude patterns from PATTERNFILE, one per line
  82. .UNINDENT
  83. .SH EXAMPLES
  84. .INDENT 0.0
  85. .INDENT 3.5
  86. .sp
  87. .EX
  88. $ borg list root\-2016\-02\-15
  89. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  90. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  91. \-rwxr\-xr\-x root root 1029624 Thu, 2014\-11\-13 00:08:51 bin/bash
  92. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  93. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  94. \&...
  95. $ borg list root\-2016\-02\-15 \-\-pattern \(dq\- bin/ba*\(dq
  96. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  97. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  98. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  99. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  100. \&...
  101. $ borg list archiveA \-\-format=\(dq{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}\(dq
  102. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 .
  103. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code
  104. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code/myproject
  105. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  106. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  107. \&...
  108. $ borg list archiveA \-\-pattern \(aq+ re:\e.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. \&...
  111. $ borg list archiveA \-\-pattern \(aq+ re:.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
  112. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  113. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  114. \&...
  115. .EE
  116. .UNINDENT
  117. .UNINDENT
  118. .SH NOTES
  119. .SS The FORMAT specifier syntax
  120. .sp
  121. The \fB\-\-format\fP option uses python\(aqs format string syntax <https://docs.python.org/3.9/library/string.html#formatstrings>
  122. \&.
  123. .sp
  124. Examples:
  125. .INDENT 0.0
  126. .INDENT 3.5
  127. .sp
  128. .EX
  129. $ borg list \-\-format \(aq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(aq ArchiveFoo
  130. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  131. \&...
  132. # {VAR:<NUMBER} \- pad to NUMBER columns left\-aligned.
  133. # {VAR:>NUMBER} \- pad to NUMBER columns right\-aligned.
  134. $ borg list \-\-format \(aq{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}\(aq ArchiveFoo
  135. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  136. \&...
  137. .EE
  138. .UNINDENT
  139. .UNINDENT
  140. .sp
  141. The following keys are always available:
  142. .INDENT 0.0
  143. .IP \(bu 2
  144. NEWLINE: OS dependent line separator
  145. .IP \(bu 2
  146. NL: alias of NEWLINE
  147. .IP \(bu 2
  148. NUL: NUL character for creating print0 / xargs \-0 like output
  149. .IP \(bu 2
  150. SPACE: space character
  151. .IP \(bu 2
  152. TAB: tab character
  153. .IP \(bu 2
  154. CR: carriage return character
  155. .IP \(bu 2
  156. LF: line feed character
  157. .UNINDENT
  158. .sp
  159. Keys available only when listing files in an archive:
  160. .INDENT 0.0
  161. .IP \(bu 2
  162. type: file type (file, dir, symlink, ...)
  163. .IP \(bu 2
  164. mode: file mode (as in stat)
  165. .IP \(bu 2
  166. uid: user id of file owner
  167. .IP \(bu 2
  168. gid: group id of file owner
  169. .IP \(bu 2
  170. user: user name of file owner
  171. .IP \(bu 2
  172. group: group name of file owner
  173. .IP \(bu 2
  174. path: file path
  175. .IP \(bu 2
  176. target: link target for symlinks
  177. .IP \(bu 2
  178. hlid: hard link identity (same if hardlinking same fs object)
  179. .IP \(bu 2
  180. flags: file flags
  181. .IP \(bu 2
  182. size: file size
  183. .IP \(bu 2
  184. num_chunks: number of chunks in this file
  185. .IP \(bu 2
  186. mtime: file modification time
  187. .IP \(bu 2
  188. ctime: file change time
  189. .IP \(bu 2
  190. atime: file access time
  191. .IP \(bu 2
  192. isomtime: file modification time (ISO 8601 format)
  193. .IP \(bu 2
  194. isoctime: file change time (ISO 8601 format)
  195. .IP \(bu 2
  196. isoatime: file access time (ISO 8601 format)
  197. .IP \(bu 2
  198. blake2b
  199. .IP \(bu 2
  200. blake2s
  201. .IP \(bu 2
  202. md5
  203. .IP \(bu 2
  204. sha1
  205. .IP \(bu 2
  206. sha224
  207. .IP \(bu 2
  208. sha256
  209. .IP \(bu 2
  210. sha384
  211. .IP \(bu 2
  212. sha3_224
  213. .IP \(bu 2
  214. sha3_256
  215. .IP \(bu 2
  216. sha3_384
  217. .IP \(bu 2
  218. sha3_512
  219. .IP \(bu 2
  220. sha512
  221. .IP \(bu 2
  222. xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
  223. .IP \(bu 2
  224. archiveid: internal ID of the archive
  225. .IP \(bu 2
  226. archivename: name of the archive
  227. .IP \(bu 2
  228. extra: prepends {target} with \(dq \-> \(dq for soft links and \(dq link to \(dq for hard links
  229. .UNINDENT
  230. .SH SEE ALSO
  231. .sp
  232. \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
  233. .SH AUTHOR
  234. The Borg Collective
  235. .\" Generated by docutils manpage writer.
  236. .