borgbackup/docs/man/borg-list.1

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

234 lines
6.5 KiB
Groff
Raw Normal View History

2026-03-15 09:34:31 -04:00
.\" Man page generated from reStructuredText
.\" by the Docutils 0.22.4 manpage writer.
2017-02-05 08:22:06 -05:00
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
2026-06-16 08:17:43 -04:00
.TH "borg-list" "1" "2026-06-16" "" "borg backup tool"
2026-03-15 09:34:31 -04:00
.SH Name
2025-12-23 12:00:09 -05:00
borg-list \- List archive contents.
2017-02-05 08:22:06 -05:00
.SH SYNOPSIS
.sp
2022-06-23 19:19:19 -04:00
borg [common options] list [options] NAME [PATH...]
2017-02-05 08:22:06 -05:00
.SH DESCRIPTION
.sp
2022-06-23 19:19:19 -04:00
This command lists the contents of an archive.
2017-02-05 08:22:06 -05:00
.sp
2025-12-23 12:00:09 -05:00
For more help on include/exclude patterns, see the output of \fIborg_patterns\fP\&.
.SH OPTIONS
.sp
See \fIborg\-common(1)\fP for common options of Borg commands.
.SS arguments
.INDENT 0.0
.TP
2022-06-23 19:19:19 -04:00
.B NAME
specify the archive name
.TP
.B PATH
paths to list; patterns are supported
.UNINDENT
2025-04-21 15:07:46 -04:00
.SS options
.INDENT 0.0
.TP
2022-06-23 19:19:19 -04:00
.B \-\-short
only print file/directory names, nothing else
.TP
2022-01-23 09:53:42 -05:00
.BI \-\-format \ FORMAT
2022-09-10 10:03:27 -04:00
specify format for file listing (default: \(dq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(dq)
.TP
2022-06-23 19:19:19 -04:00
.B \-\-json\-lines
2023-01-02 17:51:22 -05:00
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.
2025-05-19 17:20:38 -04:00
.TP
.BI \-\-depth \ N
2025-12-23 12:00:09 -05:00
only list files up to the specified directory depth
.UNINDENT
2023-06-11 17:10:23 -04:00
.SS Include/Exclude options
2017-03-26 19:58:19 -04:00
.INDENT 0.0
.TP
2020-10-04 14:33:08 -04:00
.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
2017-03-26 19:58:19 -04:00
exclude paths matching PATTERN
.TP
.BI \-\-exclude\-from \ EXCLUDEFILE
read exclude patterns from EXCLUDEFILE, one per line
.TP
.BI \-\-pattern \ PATTERN
2022-02-05 11:30:40 -05:00
include/exclude paths matching PATTERN
2017-03-26 19:58:19 -04:00
.TP
.BI \-\-patterns\-from \ PATTERNFILE
2022-02-05 11:30:40 -05:00
read include/exclude patterns from PATTERNFILE, one per line
2017-03-26 19:58:19 -04:00
.UNINDENT
.SH EXAMPLES
.INDENT 0.0
.INDENT 3.5
.sp
2025-04-21 15:07:46 -04:00
.EX
2022-06-23 19:19:19 -04:00
$ borg list root\-2016\-02\-15
drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
\-rwxr\-xr\-x root root 1029624 Thu, 2014\-11\-13 00:08:51 bin/bash
lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
\-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
\&...
2022-09-10 10:03:27 -04:00
$ borg list root\-2016\-02\-15 \-\-pattern \(dq\- bin/ba*\(dq
2020-12-06 14:45:41 -05:00
drwxr\-xr\-x root root 0 Mon, 2016\-02\-15 17:44:27 .
drwxrwxr\-x root root 0 Mon, 2016\-02\-15 19:04:49 bin
lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdiff
\-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
\&...
2022-09-10 10:03:27 -04:00
$ borg list archiveA \-\-format=\(dq{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}\(dq
drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 .
drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code
drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code/myproject
\-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
2022-01-23 09:53:42 -05:00
\-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
\&...
2023-09-14 09:52:08 -04:00
$ borg list archiveA \-\-pattern \(aq+ re:\e.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
2022-01-23 09:53:42 -05:00
\-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
\&...
2023-09-14 09:52:08 -04:00
$ borg list archiveA \-\-pattern \(aq+ re:.ext$\(aq \-\-pattern \(aq\- re:^.*$\(aq
2022-01-23 09:53:42 -05:00
\-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.ext
\-rw\-rw\-r\-\- user user 1416192 Sun, 2015\-02\-01 11:00:00 code/myproject/file.text
\&...
2025-04-21 15:07:46 -04:00
.EE
.UNINDENT
.UNINDENT
.SH NOTES
2022-01-23 09:53:42 -05:00
.SS The FORMAT specifier syntax
2017-02-05 08:22:06 -05:00
.sp
2026-06-16 08:17:43 -04:00
The \fB\-\-format\fP option uses Python\(aqs format string syntax \%<https://\:docs\:.python\:.org/\:3\:.11/\:library/\:string\:.html#\:formatstrings>\&.
2022-01-23 09:53:42 -05:00
.sp
Examples:
.INDENT 0.0
.INDENT 3.5
.sp
2025-04-21 15:07:46 -04:00
.EX
2022-06-23 19:19:19 -04:00
$ borg list \-\-format \(aq{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}\(aq ArchiveFoo
2022-01-23 09:53:42 -05:00
\-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
\&...
# {VAR:<NUMBER} \- pad to NUMBER columns left\-aligned.
# {VAR:>NUMBER} \- pad to NUMBER columns right\-aligned.
2022-06-23 19:19:19 -04:00
$ borg list \-\-format \(aq{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}\(aq ArchiveFoo
2022-01-23 09:53:42 -05:00
\-rw\-rw\-r\-\- user user 1024 Thu, 2021\-12\-09 10:22:17 file\-foo
\&...
2025-04-21 15:07:46 -04:00
.EE
2022-01-23 09:53:42 -05:00
.UNINDENT
.UNINDENT
.sp
The following keys are always available:
2026-03-15 09:34:31 -04:00
\- NEWLINE: OS dependent line separator
\- NL: alias of NEWLINE
\- NUL: NUL character for creating print0 / xargs \-0 like output
\- SPACE: space character
\- TAB: tab character
\- CR: carriage return character
\- LF: line feed character
2017-02-05 08:22:06 -05:00
.sp
2022-01-23 09:53:42 -05:00
Keys available only when listing files in an archive:
2017-02-05 08:22:06 -05:00
.INDENT 0.0
.IP \(bu 2
2023-06-11 17:10:23 -04:00
type: file type (file, dir, symlink, ...)
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
mode: file mode (as in stat)
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
uid: user id of file owner
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
gid: group id of file owner
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
user: user name of file owner
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
group: group name of file owner
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-01-02 17:51:22 -05:00
path: file path
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-02-26 15:30:54 -05:00
target: link target for symlinks
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2022-06-23 19:19:19 -04:00
hlid: hard link identity (same if hardlinking same fs object)
.IP \(bu 2
2025-12-23 12:00:09 -05:00
inode: inode number
.IP \(bu 2
2023-06-11 17:10:23 -04:00
flags: file flags
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
size: file size
2017-02-05 08:22:06 -05:00
.IP \(bu 2
num_chunks: number of chunks in this file
.IP \(bu 2
2023-06-11 17:10:23 -04:00
mtime: file modification time
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
ctime: file change time
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
atime: file access time
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
isomtime: file modification time (ISO 8601 format)
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
isoctime: file change time (ISO 8601 format)
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
isoatime: file access time (ISO 8601 format)
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2026-03-15 09:34:31 -04:00
fingerprint: Fingerprint of the file content (may have false negatives), format: H(conditions)\-H(chunk_ids)
.IP \(bu 2
2020-10-04 14:33:08 -04:00
blake2b
.IP \(bu 2
blake2s
.IP \(bu 2
2017-02-05 08:22:06 -05:00
md5
.IP \(bu 2
sha1
.IP \(bu 2
sha224
.IP \(bu 2
sha256
.IP \(bu 2
sha384
.IP \(bu 2
2020-10-04 14:33:08 -04:00
sha3_224
.IP \(bu 2
sha3_256
.IP \(bu 2
sha3_384
.IP \(bu 2
sha3_512
.IP \(bu 2
2017-02-05 08:22:06 -05:00
sha512
.IP \(bu 2
2023-06-11 17:10:23 -04:00
archiveid: internal ID of the archive
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-06-11 17:10:23 -04:00
archivename: name of the archive
2017-02-05 08:22:06 -05:00
.IP \(bu 2
2023-02-26 15:30:54 -05:00
extra: prepends {target} with \(dq \-> \(dq for soft links and \(dq link to \(dq for hard links
2017-02-05 08:22:06 -05:00
.UNINDENT
.SH SEE ALSO
.sp
2024-09-08 11:52:10 -04:00
\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
2026-03-15 09:34:31 -04:00
.SH Author
2017-02-05 08:22:06 -05:00
The Borg Collective
2026-03-15 09:34:31 -04:00
.\" End of generated man page.