borg-repo-list(1)

πŸ“¦
version 2.0.0b25 Β· 3 versions
, in ubuntu stonking

πŸ’… borg-repo-list ✨

okay bestie, so you know that one command from the borg backup tool that just... lists every archive chillin' in your repo? yeah. that's her. she's called borg-repo-list and she's lowkey the main character of "wait what did i even back up" energy. let's get into it 🫢


✨ SYNOPSIS ✨

borg [common options] repo-list [options]

🌸 DESCRIPTION 🌸

This command lists the archives contained in a repository. that's it. that's the vibe. no notes πŸ’…

πŸŽ€ Grouping archives

--group-by lists the archives grouped by the given comma-separated archive attributes, each group preceded by a header line naming it. it's giving organized. it's giving spreadsheet energy but make it cute:

$ borg repo-list --group-by name,host --format '{archive} {time}{NL}'
Group (name='home', host='host1'):
home Thu, 2026-06-04 18:00:00 +0200
home Wed, 2026-06-03 18:00:00 +0200

Group (name='home', host='host2'):
home Thu, 2026-06-04 19:00:00 +0200

Valid keys are name, host, user and tags β€” and heads up: borg's internal tags (the ones starting with @) do not affect grouping, so don't even worry about them bestie. also, archives without host / user metadata (like, say, archives transferred from a borg 1.x repository) form their own group. they're independent. they don't need a group. iconic honestly πŸ’–

These are the same keys and the same grouping that borg prune --group-by uses, so this is a way to see which archives a prune run will consider together before running it. preview the situation first, always 🧚 Without --group-by, archives are listed as before, ungrouped. just vibes, no structure.

With --json, no header lines are emitted; each archive gets a group object instead. noted πŸ“


πŸ‘‘ OPTIONS πŸ‘‘

See borg-common(1) for common options of Borg commands. (the shared stuff, the group chat rules, yk)

πŸ“ options

  • --short β€” only print the archive IDs, nothing else. minimalist era.
  • --from-borg1 β€” repository is Borg 1.x. ancient. historic. still valid. respect the elders πŸ’œ
  • --format FORMAT β€” specify format for archive listing. the default is:
{id:.8}  {time}  {archive:<15}  {tags:<10}  {username:<10}  {hostname:<10}  {comment:.40}{NL}
  • --group-by KEYS β€” comma-separated list of archive attributes to group the listed archives by; valid keys are: name, host, user, tags; default is to not group. (yes, the default is chaos. we love her.)
  • --json β€” Format output as JSON. The form of --format is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. that's just the rules, bestie 😭

πŸ¦‹ Archive filters

  • -a PATTERN, --match-archives PATTERN β€” only consider archives matching all patterns. See "borg help match-archives".
  • --sort-by KEYS β€” Comma-separated list of sorting keys; valid keys are: timestamp, archive, name, id, tags, host, user; default is: timestamp. put it in order, slay ✨
  • --first N β€” consider the first N archives after other filters are applied.
  • --last N β€” consider the last N archives after other filters are applied.
  • --oldest TIMESPAN β€” consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g., 7d or 12m.
  • --newest TIMESPAN β€” consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g., 7d or 12m.
  • --older TIMESPAN β€” consider archives older than (now - TIMESPAN), e.g., 7d or 12m.
  • --newer TIMESPAN β€” consider archives newer than (now - TIMESPAN), e.g., 7d or 12m.
  • --deleted β€” consider only soft-deleted archives. they're gone but not gone gone, if ykyk πŸ’€

🌈 EXAMPLES 🌈

$ borg repo-list
76fcb5c7  Sat, 2026-08-29 14:36:22 +0200  docs                         tw          MacBook-Pro  this is a comment
19356ae3  Sat, 2026-08-29 14:36:23 +0200  scripts                      tw          MacBook-Pro
7dd5756a  Sat, 2026-08-29 14:36:23 +0200  scripts                      tw          MacBook-Pro
99b712ef  Sat, 2026-08-29 14:36:23 +0200  src                          tw          MacBook-Pro
7698cd9e  Sat, 2026-08-29 14:36:24 +0200  scripts                      tw          MacBook-Pro
f49f8762  Sat, 2026-08-29 14:36:24 +0200  docs                         tw          MacBook-Pro
...

look at her go. so many archives. so many choices πŸ₯Ή


🧚 NOTES 🧚

πŸ’œ The FORMAT specifier syntax

The --format option uses Python's format string syntax β€” over at <https://docs.python.org/3.11/library/string.html#formatstrings>. yes, python format strings. no, you can't escape them. yes, they're kind of a lot. no cap.

Examples:

$ borg repo-list --format '{archive}{NL}'
ArchiveFoo
ArchiveBar
...

# {VAR:NUMBER} - pad to NUMBER columns.
# Strings are left-aligned, numbers are right-aligned.
# Note: the time keys (time, start, end) can not be padded - for them, the
# format spec is a strftime format string, e.g. {time:%Y-%m-%d}.
$ borg repo-list --format '{archive:36} {time} [{id}]{NL}'
ArchiveFoo                           Thu, 2021-12-09 10:22:28 [0b8e9...3b274]
...
ok important bestie: the time keys (time, start, end) can not be padded β€” for them, the format spec is a strftime format string, e.g. {time:%Y-%m-%d}. don't try to pad them, she will simply not. πŸ’€

The following keys are always available:

  • 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

Keys available only when listing archives in a repository:

  • archive: archive name
  • name: alias of "archive"
  • comment: archive comment
  • id: internal ID of the archive
  • tags: archive tags
  • time: nominal time of the archive
  • start: start time of the archive operation
  • end: end time of the archive operation
  • command_line: command line which was used to create the archive
  • hostname: hostname of host on which this archive was created
  • username: username of user who created this archive
  • size: size of this archive (data plus metadata, not considering compression and deduplication)
  • nfiles: count of files in this archive

πŸ”₯ SEE ALSO πŸ”₯

borg-common(1)


🌟 Author 🌟

The Borg Collective. the icons. the legends. the collective 🫢


okay bestie that's the whole entire page, go forth and repo-list responsibly πŸ’– this was the borg-repo-list(1) page from the borg backup tool, dated 2026-10-07, and it was literally a pleasure. mwah πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from