[feature] Using an index for restic find

I’ve not used restic find much, but it appears to be very slow, searching all the repos. It takes about 2 minutes to make a search in my repo. It’s painful when trying to find something specific and tweaking the pattern match as I go along.

Has there been any thoughts to making an index to speed up this process ?

I believe it could be improved when restic updates its repo format, specifically if tree blobs are separated from data blobs.

Ideas were discussed here.

1 Like

@foolsgold restic find traverses all subtrees for all snapshots you specify. This needs to load (and decrypt) all used tree blobs and yes, this can take some time if you do have a lot of snapshots or many subdirs in your snapshots.

If your problem is about many snapshots, you can try to specify only one snapshot to restic find and it will be much faster. Also consider removing (and pruning) unneeded snapshots.

@cfbao’s comment about mixed packs might also apply if you made your repository using an older version of restic. In that case, please use a recent version and run prune which should cure that.

1 Like