If you haven’t tried FZF with Restic, you should! Restic’s find
is great when you know what you’re looking for… but what if you’re not exactly sure, and don’t want to run the find
command repeatedly?
Just install fzf (brew install fzf
on MacOS), then pipe restic ls
to it like so:
restic ls -q <snapshot-ID> | fzf -i
I use the -i switch to make it case-insensitive. As soon as ls starts piping filenames, you can begin typing to search. You’ll know Restic is still piping data by the spinning square at the bottom-left, which will stop when Restic is done. Once it fully loads the snapshot, you can search the same file listing over and over instantaneously. Use a '
to specify an exact phrase, like 'restic
- otherwise it will match everything that has an r, e, s, t, i, c anywhere in the filename.
Alternatively, if you do restic mount
you can just cd
to the mounted directory and run fzf -i
directly. This would also make it possible to search multiple snapshots at once, though I figure restic find
is faster if you actually know what you’re looking for exactly.
Happy searching!