Listing StorageIDs


Noob question, sorry.

Is there a way of listing storageids and file name pairs when doing an ls on snapshots (either in plain text or json)?

It’d be quite handy for manual tracking of files.



What storage IDs are you talking about? Please be more specific. Can you give an example of what you’d like to see?


I’d like to see a list of files with their sha256 hashes (or an abbreviation thereof). The storageID of the snapshot is reported, but not the hashes of the files listed. It’d be nice to have a switch for that, rather than mounting the whole snapshot and running sha256sum on all the files.

I essentially want an analogue of the:

git ls-tree -r

or, more exactly:

git ls-tree -r -t $(git log -1 <commit-id> --pretty=format:'%T')

command for snapshots in restic. I realise that git blob ids are not just the straight sha1
of the file’s blob, but I thought that restic’s blob ids are sha256 hashes of the file’s blob.

I’ve only skimmed the design.rst docs, but I thought this blob id file name mapping must be readily available to the (source) code.

I can kind of get the info I want by following the instructions in design.rst (restic cat snapshot... then restic cat blob... concatenating any blob ids in the content array) but it’d be cool to just list the blob id (for easy comparisons with sha256sum manifests) without having to do so much parsing and re-computing of hashes.

Is the blob sha256 hash stored in the index file? If so, can I get at that easily? It’d be handy to check the blob against the stored sha256 hash, too.

Sorry for so many questions. I hope I’ve made a better stab at asking my original question (even though I’ve now asked more subsidiary questions!).

Thanks for getting back to me!