borg-list(1)
β¨ borg-list(1) β¨
okay bestie, welcome to the borg backup tool corner of the internet, this is your girl explaining borg-list and yes we are gonna get along π«Ά
π NAME π
borg-list β list what's actually inside a repository or an archive. like opening the bag and seeing everything in it, no cap π
πΈ SYNOPSIS πΈ
borg [common options] list [options] [REPOSITORY_OR_ARCHIVE] [PATH...]
π¦ DESCRIPTION π¦
This command lists the contents of a repository or an archive. That's it, that's the whole vibe. π§
Need more tea on include/exclude patterns? Run the borg_patterns command output, it spills everything.
π OPTIONS π
See borg-common(1) for the common options every Borg command shares, bestie.
π arguments
REPOSITORY_OR_ARCHIVEβ the repository or archive whose contents you wanna list out πPATHβ the paths you wanna list; patterns are supported, so go feral
π options
--consider-checkpointsβ show checkpoint archives in the repository contents list (default: hidden, so they're lowkey sneakily concealed π«£)--shortβ only print file/directory names, nothing else. minimalist queen behavior β¨--format FORMATβ specify the format for the file or archive listing. Defaults are: for files"{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}"; for archives"{archive:<36} {time} [{id}]{NL}"π--jsonβ only valid for listing repository contents. Formats output as JSON. The form of--formatgets ignored, but the keys you used in it still get added to the JSON output. Some keys are always present. Note: JSON can only represent text, so a"barchive"key is therefore not available π--json-linesβ only valid for listing archive contents. Formats output as JSON Lines. The form of--formatgets ignored, but the keys you used in it still get added to the JSON output. Some keys are always present. Note: JSON can only represent text, so a"bpath"key is therefore not available π
π Archive filters
-PPREFIX,--prefixPREFIX β only consider archive names starting with this prefix. (deprecated, so likeβ¦ use with awareness π)-aGLOB,--glob-archivesGLOB β only consider archive names matching the glob.sh:rules apply (without actually using thesh:prefix), seeborg help patterns.--sort-byKEYS β comma-separated list of sorting keys; valid keys are:timestamp,archive,name,id; default is:timestamp--firstN β consider first N archives after other filters were applied--lastN β consider last N archives after other filters were applied
π Include/Exclude options
-ePATTERN,--excludePATTERN β exclude paths matching PATTERN--exclude-fromEXCLUDEFILE β read exclude patterns from EXCLUDEFILE, one per line--patternPATTERN β include/exclude paths matching PATTERN--patterns-fromPATTERNFILE β read include/exclude patterns from PATTERNFILE, one per line
π₯ EXAMPLES π₯
$ borg list /path/to/repo
Monday Mon, 2016-02-15 19:15:11
repo Mon, 2016-02-15 19:26:54
root-2016-02-15 Mon, 2016-02-15 19:36:29
newname Mon, 2016-02-15 19:50:19
...
$ borg list /path/to/repo::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
...
$ borg list /path/to/repo::root-2016-02-15 --pattern "- bin/ba*"
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
...
$ borg list /path/to/repo::archiveA --format="{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}"
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
-rw-rw-r-- user user 1416192 Sun, 2015-02-01 11:00:00 code/myproject/file.text
...
$ borg list /path/to/repo/::archiveA --pattern '+ re:\.ext$' --pattern '- re:^.*$'
-rw-rw-r-- user user 1416192 Sun, 2015-02-01 11:00:00 code/myproject/file.ext
...
$ borg list /path/to/repo/::archiveA --pattern '+ re:.ext$' --pattern '- re:^.*$'
-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
...
π NOTES π
π The FORMAT specifier syntax
The --format option uses Python's format string syntax <https://docs.python.org/3.10/library/string.html#formatstrings>. it's giving very flexible, very demure β¨
Examples:
$ borg list --format '{archive}{NL}' /path/to/repo
ArchiveFoo
ArchiveBar
...
# {VAR:NUMBER} - pad to NUMBER columns.
# Strings are left-aligned, numbers are right-aligned.
# Note: time columns except ``isomtime``, ``isoctime`` and ``isoatime`` cannot be padded.
$ borg list --format '{archive:36} {time} [{id}]{NL}' /path/to/repo
ArchiveFoo Thu, 2021-12-09 10:22:28 [0b8e9a312bef3f2f6e2d0fc110c196827786c15eba0188738e81697a7fa3b274]
$ borg list --format '{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}' /path/to/repo::ArchiveFoo
-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.
$ borg list --format '{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}' /path/to/repo::ArchiveFoo
-rw-rw-r-- user user 1024 Thu, 2021-12-09 10:22:17 file-foo
...
β The following keys are always available:
NEWLINE: OS dependent line separatorNL: alias ofNEWLINENUL: NUL character for creating print0 /xargs -0like output, seebarchiveandbpathkeys belowSPACETABCRLF
β Keys available only when listing archives in a repository:
archive: archive name interpreted as text (might be missing non-text characters, seebarchive)name: alias of"archive"barchive: verbatim archive name, can contain any character except NULcomment: archive comment interpreted as text (might be missing non-text characters, seebcomment)bcomment: verbatim archive comment, can contain any character except NULid: internal ID of the archivetam: TAM authentication state of this archivestart: time (start) of creation of the archivetime: alias of"start"end: time (end) of creation of the archivecommand_line: command line which was used to create the archivehostname: hostname of host on which this archive was createdusername: username of user who created this archive
β Keys available only when listing files in an archive:
typemodeuidgidusergrouppath: path interpreted as text (might be missing non-text characters, seebpath)bpath: verbatim POSIX path, can contain any character except NULsource: link target for links (identical tolinktarget)linktargetflagssizecsize: compressed sizedsize: deduplicated sizedcsize: deduplicated compressed sizenum_chunks: number of chunks in this fileunique_chunks: number of unique chunks in this filemtimectimeatimeisomtimeisoctimeisoatimeblake2bblake2smd5sha1sha224sha256sha384sha3_224sha3_256sha3_384sha3_512sha512xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)archiveidarchivenameextra: prepends{source}with" -> "for soft links and" link to "for hard linkshealth: either"healthy"(file ok) or"broken"(if file has all-zero replacement chunks)
π«Ά SEE ALSO π«Ά
borg-common(1), borg-info(1), borg-diff(1), borg-prune(1), borg-patterns(1)
π Author π
The Borg Collective π
and that's the whole page bestie, you ate that πβ¨ sourced from borg backup tool version borg-list(1), dated 2026-07-18 β go list something iconic, periodt π
π
π¦ where this page comes from
- alpine 3.24: borgbackup-doc 1.4.5-r0 Β· BSD-3-Clause
- arch rolling: borg 1.4.5-1 Β· BSD
- ubuntu stonking: borgbackup 1.4.5-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms