The aid: archive match pattern currently matches exactly one archive ID. Multiple -a / --match-archives options are combined using AND semantics, so there is currently no convenient way to explicitly select multiple archives by their unique IDs.
For example, the following does not match either archive, since an archive cannot have both IDs:
$ borg2 repo-list -r /run/media/daniel/prometheus/Borg/ -a aid:8961fcf1 -a aid:466b7c4d
Command error: archive ID based match needs to match precisely one archive ID
Suggestion
Allow aid: to accept a comma-separated list of archive IDs, with OR semantics within the pattern. All archive IDs given must still match exactly one archive.
For example:
$ borg2 repo-list -r /run/media/daniel/prometheus/Borg/ -a aid:8961fcf1,466b7c4d
8961fcf1 Mon, 2026-08-24 11:24:32 +0200 Tuxedo-InfinityBook-14 daniel Tuxedo-InfinityBook-14 Arch Linux (Last Update: 2026-08-20T00:1
466b7c4d Tue, 2026-08-25 12:21:14 +0200 Tuxedo-InfinityBook-14 daniel Tuxedo-InfinityBook-14 Arch Linux (Last Update: 2026-08-24T15:4
This could retain the current behavior for a single ID while providing a simple way to explicitly select multiple known archives.
Benefits
This would
- allow explicitly selecting multiple unique archives,
- avoid requiring multiple matcher options with different semantics,
- make
aid: more useful for scripts and other programmatic archive selection,
- allow processing multiple explicitly selected archives in a single
borg2 invocation instead of running borg2 separately for each archive, which can reduce overall runtime.
The
aid:archive match pattern currently matches exactly one archive ID. Multiple-a/--match-archivesoptions are combined using AND semantics, so there is currently no convenient way to explicitly select multiple archives by their unique IDs.For example, the following does not match either archive, since an archive cannot have both IDs:
Suggestion
Allow
aid:to accept a comma-separated list of archive IDs, with OR semantics within the pattern. All archive IDs given must still match exactly one archive.For example:
This could retain the current behavior for a single ID while providing a simple way to explicitly select multiple known archives.
Benefits
This would
aid:more useful for scripts and other programmatic archive selection,borg2invocation instead of runningborg2separately for each archive, which can reduce overall runtime.