List files in a snapshot, help


This part of the documentation is unclear for me:

Restoring from a snapshot:

You can use the command restic ls latest or restic find foo to find the path to the file within the snapshot. This path you can then pass to --include in verbatim to only restore the single file or directory.

It really misses some examples…

Please could you give me an (some) example(s) of command to list all files, or a subset of files, in a particular snapshot (not necessarily the latest)?

I’m on Windows.


List all files of a specific snapshot (adding --long to show more information):
restic ls --long SNAPSHOTID

Filter the files of a specific snapshot to show only the Downloads directory of a user:
restic ls --long SNAPSHOTID /C/Users/username/Downloads

Note that the path style is a bit weird as restic converts it to unix style. Please see restic ls --help for more information.

1 Like