borg-list.1 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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 "2022-06-04" "" "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 \-\-short
  57. only print file/directory names, nothing else
  58. .TP
  59. .BI \-\-format \ FORMAT\fR,\fB \ \-\-list\-format \ FORMAT
  60. specify format for file or archive listing (default for files: "{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}"; for archives: "{archive:<36} {time} [{id}]{NL}")
  61. .TP
  62. .B \-\-json
  63. 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 "barchive" key is therefore not available.
  64. .TP
  65. .B \-\-json\-lines
  66. 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 "bpath" key is therefore not available.
  67. .UNINDENT
  68. .SS Archive filters
  69. .INDENT 0.0
  70. .TP
  71. .BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
  72. only consider archive names starting with this prefix.
  73. .TP
  74. .BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
  75. only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
  76. .TP
  77. .BI \-\-sort\-by \ KEYS
  78. Comma\-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  79. .TP
  80. .BI \-\-first \ N
  81. consider first N archives after other filters were applied
  82. .TP
  83. .BI \-\-last \ N
  84. consider last N archives after other filters were applied
  85. .UNINDENT
  86. .SS Exclusion options
  87. .INDENT 0.0
  88. .TP
  89. .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
  90. exclude paths matching PATTERN
  91. .TP
  92. .BI \-\-exclude\-from \ EXCLUDEFILE
  93. read exclude patterns from EXCLUDEFILE, one per line
  94. .TP
  95. .BI \-\-pattern \ PATTERN
  96. include/exclude paths matching PATTERN
  97. .TP
  98. .BI \-\-patterns\-from \ PATTERNFILE
  99. read include/exclude patterns from PATTERNFILE, one per line
  100. .UNINDENT
  101. .SH EXAMPLES
  102. .INDENT 0.0
  103. .INDENT 3.5
  104. .sp
  105. .nf
  106. .ft C
  107. $ borg list /path/to/repo
  108. Monday Mon, 2016\-02\-15 19:15:11
  109. repo Mon, 2016\-02\-15 19:26:54
  110. root\-2016\-02\-15 Mon, 2016\-02\-15 19:36:29
  111. newname Mon, 2016\-02\-15 19:50:19
  112. \&...
  113. $ borg list /path/to/repo::root\-2016\-02\-15
  114. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  115. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  116. \-rwxr\-xr\-x root root 1029624 Thu, 2014\-11\-13 00:08:51 bin/bash
  117. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  118. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  119. \&...
  120. $ borg list /path/to/repo::root\-2016\-02\-15 \-\-pattern "\- bin/ba*"
  121. drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
  122. drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
  123. lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
  124. \-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
  125. \&...
  126. $ borg list /path/to/repo::archiveA \-\-format="{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}"
  127. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 .
  128. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code
  129. drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code/myproject
  130. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  131. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  132. \&...
  133. $ borg list /path/to/repo/::archiveA \-\-pattern \(aqre:\e.ext$\(aq
  134. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  135. \&...
  136. $ borg list /path/to/repo/::archiveA \-\-pattern \(aqre:.ext$\(aq
  137. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
  138. \-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
  139. \&...
  140. .ft P
  141. .fi
  142. .UNINDENT
  143. .UNINDENT
  144. .SH NOTES
  145. .SS The FORMAT specifier syntax
  146. .sp
  147. The \fB\-\-format\fP option uses python\(aqs \fI\%format string syntax\fP\&.
  148. .sp
  149. Examples:
  150. .INDENT 0.0
  151. .INDENT 3.5
  152. .sp
  153. .nf
  154. .ft C
  155. $ borg list \-\-format \(aq{archive}{NL}\(aq /path/to/repo
  156. ArchiveFoo
  157. ArchiveBar
  158. \&...
  159. # {VAR:NUMBER} \- pad to NUMBER columns.
  160. # Strings are left\-aligned, numbers are right\-aligned.
  161. # Note: time columns except \(ga\(gaisomtime\(ga\(ga, \(ga\(gaisoctime\(ga\(ga and \(ga\(gaisoatime\(ga\(ga cannot be padded.
  162. $ borg list \-\-format \(aq{archive:36} {time} [{id}]{NL}\(aq /path/to/repo
  163. ArchiveFoo Thu, 2021\-12\-09 10:22:28 [0b8e9a312bef3f2f6e2d0fc110c196827786c15eba0188738e81697a7fa3b274]
  164. $ borg list \-\-format \(aq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(aq /path/to/repo::ArchiveFoo
  165. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  166. \&...
  167. # {VAR:<NUMBER} \- pad to NUMBER columns left\-aligned.
  168. # {VAR:>NUMBER} \- pad to NUMBER columns right\-aligned.
  169. $ borg list \-\-format \(aq{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}\(aq /path/to/repo::ArchiveFoo
  170. \-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
  171. \&...
  172. .ft P
  173. .fi
  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 "archive"
  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. start: time (start) of creation of the archive
  211. .IP \(bu 2
  212. time: alias of "start"
  213. .IP \(bu 2
  214. end: time (end) of creation of the archive
  215. .IP \(bu 2
  216. command_line: command line which was used to create the archive
  217. .IP \(bu 2
  218. hostname: hostname of host on which this archive was created
  219. .IP \(bu 2
  220. username: username of user who created this archive
  221. .UNINDENT
  222. .sp
  223. Keys available only when listing files in an archive:
  224. .INDENT 0.0
  225. .IP \(bu 2
  226. type
  227. .IP \(bu 2
  228. mode
  229. .IP \(bu 2
  230. uid
  231. .IP \(bu 2
  232. gid
  233. .IP \(bu 2
  234. user
  235. .IP \(bu 2
  236. group
  237. .IP \(bu 2
  238. path: path interpreted as text (might be missing non\-text characters, see bpath)
  239. .IP \(bu 2
  240. bpath: verbatim POSIX path, can contain any character except NUL
  241. .IP \(bu 2
  242. source: link target for links (identical to linktarget)
  243. .IP \(bu 2
  244. linktarget
  245. .IP \(bu 2
  246. flags
  247. .IP \(bu 2
  248. size
  249. .IP \(bu 2
  250. csize: compressed size
  251. .IP \(bu 2
  252. dsize: deduplicated size
  253. .IP \(bu 2
  254. dcsize: deduplicated compressed size
  255. .IP \(bu 2
  256. num_chunks: number of chunks in this file
  257. .IP \(bu 2
  258. unique_chunks: number of unique chunks in this file
  259. .IP \(bu 2
  260. mtime
  261. .IP \(bu 2
  262. ctime
  263. .IP \(bu 2
  264. atime
  265. .IP \(bu 2
  266. isomtime
  267. .IP \(bu 2
  268. isoctime
  269. .IP \(bu 2
  270. isoatime
  271. .IP \(bu 2
  272. blake2b
  273. .IP \(bu 2
  274. blake2s
  275. .IP \(bu 2
  276. md5
  277. .IP \(bu 2
  278. sha1
  279. .IP \(bu 2
  280. sha224
  281. .IP \(bu 2
  282. sha256
  283. .IP \(bu 2
  284. sha384
  285. .IP \(bu 2
  286. sha3_224
  287. .IP \(bu 2
  288. sha3_256
  289. .IP \(bu 2
  290. sha3_384
  291. .IP \(bu 2
  292. sha3_512
  293. .IP \(bu 2
  294. sha512
  295. .IP \(bu 2
  296. archiveid
  297. .IP \(bu 2
  298. archivename
  299. .IP \(bu 2
  300. extra: prepends {source} with " \-> " for soft links and " link to " for hard links
  301. .IP \(bu 2
  302. health: either "healthy" (file ok) or "broken" (if file has all\-zero replacement chunks)
  303. .UNINDENT
  304. .SH SEE ALSO
  305. .sp
  306. \fIborg\-common(1)\fP, \fIborg\-info(1)\fP, \fIborg\-diff(1)\fP, \fIborg\-prune(1)\fP, \fIborg\-patterns(1)\fP
  307. .SH AUTHOR
  308. The Borg Collective
  309. .\" Generated by docutils manpage writer.
  310. .