borg-list.1 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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-04-18" "" "borg backup tool"
  31. .SH NAME
  32. borg-list \- List archive or repository contents
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] list [options] [REPOSITORY_OR_ARCHIVE] [PATH...]
  36. .SH DESCRIPTION
  37. .sp
  38. This command lists the contents of a repository or 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 REPOSITORY_OR_ARCHIVE
  48. repository or archive to list contents of
  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 \-\-consider\-checkpoints
  57. Show checkpoint archives in the repository contents list (default: hidden).
  58. .TP
  59. .B \-\-short
  60. only print file/directory names, nothing else
  61. .TP
  62. .BI \-\-format \ FORMAT
  63. specify format for file or archive listing (default for files: \(dq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(dq; for archives: \(dq{archive:<36} {time} [{id}]{NL}\(dq)
  64. .TP
  65. .B \-\-json
  66. Only valid for listing repository contents. Format output as JSON. 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. A \(dqbarchive\(dq key is therefore not available.
  67. .TP
  68. .B \-\-json\-lines
  69. Only valid for listing archive contents. 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. A \(dqbpath\(dq key is therefore not available.
  70. .UNINDENT
  71. .SS Archive filters
  72. .INDENT 0.0
  73. .TP
  74. .BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
  75. only consider archive names starting with this prefix. (deprecated)
  76. .TP
  77. .BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
  78. only consider archive names matching the glob. sh: rules apply (without actually using the sh: prefix), see \(dqborg help patterns\(dq.
  79. .TP
  80. .BI \-\-sort\-by \ KEYS
  81. Comma\-separated list of sorting keys; valid keys are: timestamp, archive, name, id; default is: timestamp
  82. .TP
  83. .BI \-\-first \ N
  84. consider first N archives after other filters were applied
  85. .TP
  86. .BI \-\-last \ N
  87. consider last N archives after other filters were applied
  88. .UNINDENT
  89. .SS Include/Exclude options
  90. .INDENT 0.0
  91. .TP
  92. .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
  93. exclude paths matching PATTERN
  94. .TP
  95. .BI \-\-exclude\-from \ EXCLUDEFILE
  96. read exclude patterns from EXCLUDEFILE, one per line
  97. .TP
  98. .BI \-\-pattern \ PATTERN
  99. include/exclude paths matching PATTERN
  100. .TP
  101. .BI \-\-patterns\-from \ PATTERNFILE
  102. read include/exclude patterns from PATTERNFILE, one per line
  103. .UNINDENT
  104. .SH EXAMPLES
  105. .INDENT 0.0
  106. .INDENT 3.5
  107. .sp
  108. .EX
  109. $ borg list /path/to/repo
  110. Monday Mon, 2016\-02\-15 19:15:11
  111. repo Mon, 2016\-02\-15 19:26:54
  112. root\-2016\-02\-15 Mon, 2016\-02\-15 19:36:29
  113. newname Mon, 2016\-02\-15 19:50:19
  114. \&...
  115. $ borg list /path/to/repo::root\-2016\-02\-15
  116. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  117. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  118. \-rwxr\-xr\-x root root 1029624 Thu, 2014\-11\-13 00:08:51 bin/bash
  119. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  120. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  121. \&...
  122. $ borg list /path/to/repo::root\-2016\-02\-15 \-\-pattern \(dq\- bin/ba*\(dq
  123. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  124. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  125. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  126. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  127. \&...
  128. $ borg list /path/to/repo::archiveA \-\-format=\(dq{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}\(dq
  129. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 .
  130. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code
  131. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code/myproject
  132. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  133. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  134. \&...
  135. $ borg list /path/to/repo/::archiveA \-\-pattern \(aq+ re:\e.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
  136. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  137. \&...
  138. $ borg list /path/to/repo/::archiveA \-\-pattern \(aq+ re:.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
  139. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  140. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  141. \&...
  142. .EE
  143. .UNINDENT
  144. .UNINDENT
  145. .SH NOTES
  146. .SS The FORMAT specifier syntax
  147. .sp
  148. The \fB\-\-format\fP option uses python\(aqs format string syntax <https://docs.python.org/3.9/library/string.html#formatstrings>
  149. \&.
  150. .sp
  151. Examples:
  152. .INDENT 0.0
  153. .INDENT 3.5
  154. .sp
  155. .EX
  156. $ borg list \-\-format \(aq{archive}{NL}\(aq /path/to/repo
  157. ArchiveFoo
  158. ArchiveBar
  159. \&...
  160. # {VAR:NUMBER} \- pad to NUMBER columns.
  161. # Strings are left\-aligned, numbers are right\-aligned.
  162. # Note: time columns except \(ga\(gaisomtime\(ga\(ga, \(ga\(gaisoctime\(ga\(ga and \(ga\(gaisoatime\(ga\(ga cannot be padded.
  163. $ borg list \-\-format \(aq{archive:36} {time} [{id}]{NL}\(aq /path/to/repo
  164. ArchiveFoo Thu, 2021\-12\-09 10:22:28 [0b8e9a312bef3f2f6e2d0fc110c196827786c15eba0188738e81697a7fa3b274]
  165. $ borg list \-\-format \(aq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(aq /path/to/repo::ArchiveFoo
  166. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  167. \&...
  168. # {VAR:<NUMBER} \- pad to NUMBER columns left\-aligned.
  169. # {VAR:>NUMBER} \- pad to NUMBER columns right\-aligned.
  170. $ borg list \-\-format \(aq{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}\(aq /path/to/repo::ArchiveFoo
  171. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  172. \&...
  173. .EE
  174. .UNINDENT
  175. .UNINDENT
  176. .sp
  177. The following keys are always available:
  178. .INDENT 0.0
  179. .IP \(bu 2
  180. NEWLINE: OS dependent line separator
  181. .IP \(bu 2
  182. NL: alias of NEWLINE
  183. .IP \(bu 2
  184. NUL: NUL character for creating print0 / xargs \-0 like output, see barchive and bpath keys below
  185. .IP \(bu 2
  186. SPACE
  187. .IP \(bu 2
  188. TAB
  189. .IP \(bu 2
  190. CR
  191. .IP \(bu 2
  192. LF
  193. .UNINDENT
  194. .sp
  195. Keys available only when listing archives in a repository:
  196. .INDENT 0.0
  197. .IP \(bu 2
  198. archive: archive name interpreted as text (might be missing non\-text characters, see barchive)
  199. .IP \(bu 2
  200. name: alias of \(dqarchive\(dq
  201. .IP \(bu 2
  202. barchive: verbatim archive name, can contain any character except NUL
  203. .IP \(bu 2
  204. comment: archive comment interpreted as text (might be missing non\-text characters, see bcomment)
  205. .IP \(bu 2
  206. bcomment: verbatim archive comment, can contain any character except NUL
  207. .IP \(bu 2
  208. id: internal ID of the archive
  209. .IP \(bu 2
  210. tam: TAM authentication state of this archive
  211. .IP \(bu 2
  212. start: time (start) of creation of the archive
  213. .IP \(bu 2
  214. time: alias of \(dqstart\(dq
  215. .IP \(bu 2
  216. end: time (end) of creation of the archive
  217. .IP \(bu 2
  218. command_line: command line which was used to create the archive
  219. .IP \(bu 2
  220. hostname: hostname of host on which this archive was created
  221. .IP \(bu 2
  222. username: username of user who created this archive
  223. .UNINDENT
  224. .sp
  225. Keys available only when listing files in an archive:
  226. .INDENT 0.0
  227. .IP \(bu 2
  228. type
  229. .IP \(bu 2
  230. mode
  231. .IP \(bu 2
  232. uid
  233. .IP \(bu 2
  234. gid
  235. .IP \(bu 2
  236. user
  237. .IP \(bu 2
  238. group
  239. .IP \(bu 2
  240. path: path interpreted as text (might be missing non\-text characters, see bpath)
  241. .IP \(bu 2
  242. bpath: verbatim POSIX path, can contain any character except NUL
  243. .IP \(bu 2
  244. source: link target for links (identical to linktarget)
  245. .IP \(bu 2
  246. linktarget
  247. .IP \(bu 2
  248. flags
  249. .IP \(bu 2
  250. size
  251. .IP \(bu 2
  252. csize: compressed size
  253. .IP \(bu 2
  254. dsize: deduplicated size
  255. .IP \(bu 2
  256. dcsize: deduplicated compressed size
  257. .IP \(bu 2
  258. num_chunks: number of chunks in this file
  259. .IP \(bu 2
  260. unique_chunks: number of unique chunks in this file
  261. .IP \(bu 2
  262. mtime
  263. .IP \(bu 2
  264. ctime
  265. .IP \(bu 2
  266. atime
  267. .IP \(bu 2
  268. isomtime
  269. .IP \(bu 2
  270. isoctime
  271. .IP \(bu 2
  272. isoatime
  273. .IP \(bu 2
  274. blake2b
  275. .IP \(bu 2
  276. blake2s
  277. .IP \(bu 2
  278. md5
  279. .IP \(bu 2
  280. sha1
  281. .IP \(bu 2
  282. sha224
  283. .IP \(bu 2
  284. sha256
  285. .IP \(bu 2
  286. sha384
  287. .IP \(bu 2
  288. sha3_224
  289. .IP \(bu 2
  290. sha3_256
  291. .IP \(bu 2
  292. sha3_384
  293. .IP \(bu 2
  294. sha3_512
  295. .IP \(bu 2
  296. sha512
  297. .IP \(bu 2
  298. xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
  299. .IP \(bu 2
  300. archiveid
  301. .IP \(bu 2
  302. archivename
  303. .IP \(bu 2
  304. extra: prepends {source} with \(dq \-> \(dq for soft links and \(dq link to \(dq for hard links
  305. .IP \(bu 2
  306. health: either \(dqhealthy\(dq (file ok) or \(dqbroken\(dq (if file has all\-zero replacement chunks)
  307. .UNINDENT
  308. .SH SEE ALSO
  309. .sp
  310. \fIborg\-common(1)\fP, \fIborg\-info(1)\fP, \fIborg\-diff(1)\fP, \fIborg\-prune(1)\fP, \fIborg\-patterns(1)\fP
  311. .SH AUTHOR
  312. The Borg Collective
  313. .\" Generated by docutils manpage writer.
  314. .