Find all snapshots that contain a file

Is it possible to find all snapshots that contain a certain file, e.g. /Users/ilyagr/dev/large_repo/?

I tried restic snapshots --path /Users/ilyagr/dev/large_repo/ and /Users/ilyagr/dev/large_repo/filename, but it found nothing. It seems that searches only the dirs that were explicitly backed up; e.g. /Users/ilyagr for me since I backed up with restic backup /Users/ilyagr.

restic find is what you are looking for. You can find more details here.

2 Likes

Indeed! Thank you very much!

Perhaps this could be mentioned in the description of the --path option.

Also, perhaps it makes sense to mention it in Working with repositories — restic 0.17.1 documentation. At least, that’s where I was looking unsuccessfully.