borg-list.1 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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 "2024-03-29" "" "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 optional arguments
  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. .nf
  109. .ft C
  110. $ borg list /path/to/repo
  111. Monday Mon, 2016\-02\-15 19:15:11
  112. repo Mon, 2016\-02\-15 19:26:54
  113. root\-2016\-02\-15 Mon, 2016\-02\-15 19:36:29
  114. newname Mon, 2016\-02\-15 19:50:19
  115. \&...
  116. $ borg list /path/to/repo::root\-2016\-02\-15
  117. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  118. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  119. \-rwxr\-xr\-x root root 1029624 Thu, 2014\-11\-13 00:08:51 bin/bash
  120. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  121. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  122. \&...
  123. $ borg list /path/to/repo::root\-2016\-02\-15 \-\-pattern \(dq\- bin/ba*\(dq
  124. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  125. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  126. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  127. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  128. \&...
  129. $ borg list /path/to/repo::archiveA \-\-format=\(dq{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}\(dq
  130. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 .
  131. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code
  132. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code/myproject
  133. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  134. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  135. \&...
  136. $ borg list /path/to/repo/::archiveA \-\-pattern \(aq+ re:\e.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
  137. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  138. \&...
  139. $ borg list /path/to/repo/::archiveA \-\-pattern \(aq+ re:.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
  140. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  141. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  142. \&...
  143. .ft P
  144. .fi
  145. .UNINDENT
  146. .UNINDENT
  147. .SH NOTES
  148. .SS The FORMAT specifier syntax
  149. .sp
  150. The \fB\-\-format\fP option uses python\(aqs \fI\%format string syntax\fP\&.
  151. .sp
  152. Examples:
  153. .INDENT 0.0
  154. .INDENT 3.5
  155. .sp
  156. .nf
  157. .ft C
  158. $ borg list \-\-format \(aq{archive}{NL}\(aq /path/to/repo
  159. ArchiveFoo
  160. ArchiveBar
  161. \&...
  162. # {VAR:NUMBER} \- pad to NUMBER columns.
  163. # Strings are left\-aligned, numbers are right\-aligned.
  164. # Note: time columns except \(ga\(gaisomtime\(ga\(ga, \(ga\(gaisoctime\(ga\(ga and \(ga\(gaisoatime\(ga\(ga cannot be padded.
  165. $ borg list \-\-format \(aq{archive:36} {time} [{id}]{NL}\(aq /path/to/repo
  166. ArchiveFoo Thu, 2021\-12\-09 10:22:28 [0b8e9a312bef3f2f6e2d0fc110c196827786c15eba0188738e81697a7fa3b274]
  167. $ borg list \-\-format \(aq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(aq /path/to/repo::ArchiveFoo
  168. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  169. \&...
  170. # {VAR:<NUMBER} \- pad to NUMBER columns left\-aligned.
  171. # {VAR:>NUMBER} \- pad to NUMBER columns right\-aligned.
  172. $ borg list \-\-format \(aq{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}\(aq /path/to/repo::ArchiveFoo
  173. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  174. \&...
  175. .ft P
  176. .fi
  177. .UNINDENT
  178. .UNINDENT
  179. .sp
  180. The following keys are always available:
  181. .INDENT 0.0
  182. .IP \(bu 2
  183. NEWLINE: OS dependent line separator
  184. .IP \(bu 2
  185. NL: alias of NEWLINE
  186. .IP \(bu 2
  187. NUL: NUL character for creating print0 / xargs \-0 like output, see barchive and bpath keys below
  188. .IP \(bu 2
  189. SPACE
  190. .IP \(bu 2
  191. TAB
  192. .IP \(bu 2
  193. CR
  194. .IP \(bu 2
  195. LF
  196. .UNINDENT
  197. .sp
  198. Keys available only when listing archives in a repository:
  199. .INDENT 0.0
  200. .IP \(bu 2
  201. archive: archive name interpreted as text (might be missing non\-text characters, see barchive)
  202. .IP \(bu 2
  203. name: alias of \(dqarchive\(dq
  204. .IP \(bu 2
  205. barchive: verbatim archive name, can contain any character except NUL
  206. .IP \(bu 2
  207. comment: archive comment interpreted as text (might be missing non\-text characters, see bcomment)
  208. .IP \(bu 2
  209. bcomment: verbatim archive comment, can contain any character except NUL
  210. .IP \(bu 2
  211. id: internal ID of the archive
  212. .IP \(bu 2
  213. tam: TAM authentication state of this archive
  214. .IP \(bu 2
  215. start: time (start) of creation of the archive
  216. .IP \(bu 2
  217. time: alias of \(dqstart\(dq
  218. .IP \(bu 2
  219. end: time (end) of creation of the archive
  220. .IP \(bu 2
  221. command_line: command line which was used to create the archive
  222. .IP \(bu 2
  223. hostname: hostname of host on which this archive was created
  224. .IP \(bu 2
  225. username: username of user who created this archive
  226. .UNINDENT
  227. .sp
  228. Keys available only when listing files in an archive:
  229. .INDENT 0.0
  230. .IP \(bu 2
  231. type
  232. .IP \(bu 2
  233. mode
  234. .IP \(bu 2
  235. uid
  236. .IP \(bu 2
  237. gid
  238. .IP \(bu 2
  239. user
  240. .IP \(bu 2
  241. group
  242. .IP \(bu 2
  243. path: path interpreted as text (might be missing non\-text characters, see bpath)
  244. .IP \(bu 2
  245. bpath: verbatim POSIX path, can contain any character except NUL
  246. .IP \(bu 2
  247. source: link target for links (identical to linktarget)
  248. .IP \(bu 2
  249. linktarget
  250. .IP \(bu 2
  251. flags
  252. .IP \(bu 2
  253. size
  254. .IP \(bu 2
  255. csize: compressed size
  256. .IP \(bu 2
  257. dsize: deduplicated size
  258. .IP \(bu 2
  259. dcsize: deduplicated compressed size
  260. .IP \(bu 2
  261. num_chunks: number of chunks in this file
  262. .IP \(bu 2
  263. unique_chunks: number of unique chunks in this file
  264. .IP \(bu 2
  265. mtime
  266. .IP \(bu 2
  267. ctime
  268. .IP \(bu 2
  269. atime
  270. .IP \(bu 2
  271. isomtime
  272. .IP \(bu 2
  273. isoctime
  274. .IP \(bu 2
  275. isoatime
  276. .IP \(bu 2
  277. blake2b
  278. .IP \(bu 2
  279. blake2s
  280. .IP \(bu 2
  281. md5
  282. .IP \(bu 2
  283. sha1
  284. .IP \(bu 2
  285. sha224
  286. .IP \(bu 2
  287. sha256
  288. .IP \(bu 2
  289. sha384
  290. .IP \(bu 2
  291. sha3_224
  292. .IP \(bu 2
  293. sha3_256
  294. .IP \(bu 2
  295. sha3_384
  296. .IP \(bu 2
  297. sha3_512
  298. .IP \(bu 2
  299. sha512
  300. .IP \(bu 2
  301. xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
  302. .IP \(bu 2
  303. archiveid
  304. .IP \(bu 2
  305. archivename
  306. .IP \(bu 2
  307. extra: prepends {source} with \(dq \-> \(dq for soft links and \(dq link to \(dq for hard links
  308. .IP \(bu 2
  309. health: either \(dqhealthy\(dq (file ok) or \(dqbroken\(dq (if file has all\-zero replacement chunks)
  310. .UNINDENT
  311. .SH SEE ALSO
  312. .sp
  313. \fIborg\-common(1)\fP, \fIborg\-info(1)\fP, \fIborg\-diff(1)\fP, \fIborg\-prune(1)\fP, \fIborg\-patterns(1)\fP
  314. .SH AUTHOR
  315. The Borg Collective
  316. .\" Generated by docutils manpage writer.
  317. .