borg icon indicating copy to clipboard operation
borg copied to clipboard

Borg2 list : Command Error: ['archive-name'] needed to match precisely one archive, but matched 25.

Open laurentriffard opened this issue 2 months ago • 2 comments

Hi,

Using borg2 here :

# borg --version
borg-linux-glibc236 2.0.0b19

I did a bunch of backups with the same archive name. As stated in the docs https://borgbackup.readthedocs.io/en/master/usage/create.html :

The archive name does NOT need to be unique, you can and should use the same name for a series of archives. The unique archive identifier is its ID (hash) and you can abbreviate the ID as long as it is unique.

Extract of repo-list :

# borg repo-list 
[…]
3ecbb3a1  Sat, 2025-10-04 17:40:42 +0200  save-goblin                  laurent     goblin      
20c099e3  Sun, 2025-10-05 21:09:03 +0200  save-goblin                  laurent     goblin      
c4242beb  Thu, 2025-10-09 19:31:33 +0200  save-goblin                  laurent     goblin      
09f13abc  Thu, 2025-10-09 19:46:09 +0200  save-goblin                  laurent     goblin    

How can I specify a particular archive with borg list ?

# borg list save-goblin
Command Error: ['save-goblin'] needed to match precisely one archive, but matched 25.

Is there a way to target an archive by its id ? Didn't find an answer in the docs…

laurentriffard avatar Oct 10 '25 20:10 laurentriffard

Ok, just found it after digging in the git tree

# borg list aid:09f13abc .config 
drwxr-xr-x laurent laurent        0 Sat, 2025-10-04 11:54:30 +0200 .config
[…]

This is documented in Docs / QuickStart, but not in Docs / Usage / borg list, nor in CLI help.

laurentriffard avatar Oct 10 '25 20:10 laurentriffard

The aid:xxxxxx mechanism is a general one, so I want to avoid to document it for ALL commands.

Need to find a good one place for the docs.

ThomasWaldmann avatar Oct 10 '25 21:10 ThomasWaldmann