Dump: No snapshot found bug?

Why does this command work

restic.exe ls --host=win11 --repo=R:\restic --tag=test--verbose=1 latest /path/file.txt

but this one does not?

restic.exe dump --host=win11 --repo=R:\restic --tag=test --verbose=1 latest /path/file.txt

Fatal: failed to find snapshot: snapshot filter (Paths:[win11] Tags:[[test]] Hosts:[]): no snapshot found

Is this a bug?

restic.exe dump --host=win11--repo=R:\restic --tag=test --verbose=1 latest /path/file.txt

Looks like you’re missing a space there between win11 and --repo.

Indeed in my example there was a typo (when I changed the hostname from the private name to win11). But I have corrected the typo in the OP. Now you can try it to reproduce the bug your self

Ah, shame it wasn’t something so simple. I get the same behaviour under linux, it looks like restic is swapping the values of --host with --path for some reason in the dump command.

[user@oracca ~]$ restic ls --host=oracca.bitek.local --repo=/usr/local/tmp/restic-repo-able/ --tag=testtag --verbose=1 latest /etc/hosts
enter password for repository: 
repository e371be24 opened (version 2, compression level auto)
snapshot 01c796a5 of [/etc/hosts] filtered by [/etc/hosts] at 2023-04-07 12:54:11.448177528 +0100 BST):
/etc/hosts
[user@oracca ~]$ restic dump --host=oracca.bitek.local --repo=/usr/local/tmp/restic-repo-able/ --tag=testtag --verbose=1 latest /etc/hosts > dump.tar
enter password for repository: 
Fatal: failed to find snapshot: snapshot filter (Paths:[oracca.bitek.local] Tags:[[testtag]] Hosts:[]): no snapshot found
[user@oracca ~]$ restic dump --repo=/usr/local/tmp/restic-repo-able/ --path=/etc --host=oracca.bitek.local --tag=testtag --verbose=1 latest /etc/hosts > dump.tar
enter password for repository: 
Fatal: failed to find snapshot: snapshot filter (Paths:[oracca.bitek.local] Tags:[[testtag]] Hosts:[/etc]): no snapshot found
[user@oracca ~]$ 

I think it’s probably a bug, and worth opening an issue for.

Oh for clarity, my restic version:

[user@oracca ~]$ restic version
restic 0.15.1 compiled with go1.19.5 on linux/amd64

That looks a lot like restic dump latest has a bug with the arguments · Issue #4211 · restic/restic · GitHub

1 Like

Indeed. Fixed in February already, but 0.15.2 not released yet :slight_smile: Thanks. Next time I will check in that “issue” list too.