Getting a catalog of offline restic repositories

I’ve decided to try and use restic to manage archival repositories of different kinds of media, with the bulk of the data being in photos and videos. I’d like to be able to create a restic repository on a removable disk, store it somewhere offline but be able to check its trees. For example, I’d like to check for the existence of a SHA-256 file hash or filename across my restic repositories.

The usecase for this is to split my costs between critical data (like portfolio-worthy photos or videos) and everything else that I might want to keep but don’t need instant access to.

My first thought has been to make a tool to extract all of the metadata from a repo.

So, funny thing, I’m always trying to do due diligence and make sure I’m posting worthwhile so I started to read up on the repo format and one thing led to another and I found the cold backend topic and then rustic.

I could see maybe still having a way to search across repositories, but I wouldn’t need to extract all the data into mongo or something, I could just iterate over the hot repos.

Still posting this in case anyone has feedback.


Since I don’t know any good (a.k.a. fast) way of doing it, my method would be running backup command with json switch and collect filenames from there externally…

rustic author here.

The hot/cold repository option should support what you want: All metadata is additionally saved in the hot repository and for many commands (like snapshots, ls etc.) only the hot repo is accessed.

Note that rustic in hot/cold repo mode checks if the cold repo exists and has a config file; running rustic only with a hot repo tells you that you should specify the cold repo. As a workaround, you can use

rustic -r /path/to/hot-repo --repo-hot /path/to/hot-repo

(of course only with commands that don’t need to access the cold repo).
If you encounter any problems or have questions, please open an issue or discussion at the rustic github project page.

Side remark: Using restic on the hot repo would work too, as it doesn’t check whether this is a hot repo…

Thanks for the reply!

This solves for much of my use-case and all I’m really left with is querying a bunch of hot repos for the presence of a file/hash.