Split a combined repository?

Three of my client computers store their data in a common repository on a server. My question: Is it possible to convert this combined repository so that three independent repositories are created (one repository per client)? The history should be preserved.

Thanks in advance,


Sure. Create three new repositories using restic init and make sure to use the --copy-chunker-params flag with --repo2 to copy the content chunker parameters from the old repository. Then you can use restic copy to copy snapshots between the old repository and each new repository, as appropriate.

Thank you for your advice.

Another way is to simply make two copies of the repository in the filesystem, so that you have one copy per client. @cdhowie What do you gain by initializing new repositories and copying the data to them?

If initializing new repositories, they will all have a different master key, which is good from a security perspective – if these clients do not mutually trust each other, or you are trying to minimize attack surface, accidental exposure of one client’s repository to another client does not leak any (plaintext) information (provided that different key passphrases are also used).

It also gives each repository a different ID, which is good if you have one system doing maintenance tasks on them. If they all have the same ID, restic’s cache is mostly useless as it needs to be rebuilt each time you interact with a different repository sharing the same ID.


Good answer, thanks!

1 Like