Metadata cache with multiple repos

“We’ve added a local cache for metadata so that restic doesn’t need to load all metadata (snapshots, indexes, …) from the repo each time it starts. By default the cache is active, but there’s a new global option --no-cache that can be used to disable the cache. By deafult, the cache a standard cache folder for the OS, which can be overridden with --cache-dir. The cache will automatically populate, indexes and snapshots are saved as they are loaded.”

Question… What if my machine is targeting multiple repos?

For example, I backup to a local USB drive as well as a remote destination. And because of availability, they may not be at the same status for backup…

Does the new cache somehow store the cache separate? Per repo?

Thank you.

Yes, your cache folder will contain one subfolder per repository. So it’s all fine, nothing to worry about.

As @rawtaz said correctly, there’s a subdir per repository within the cache. Each repo has a unique ID (chosen at random during init), that’s what’s used for the directory name. We’ve written a small spec for the cache, you can find it here: