Question: Kopia Repo vs Multiple Hosts

I was hoping to obtain some additional clarification around the behavior of Kopia with multiple hosts/clients. I’ve looked through the online documentation and have done a search over the forum, but I’ve yet to find a resource that clearly answers my question unfortunately (which very well could be my inability to search for the right term(s))!

Presently, I have a very vanilla Kopia use-case:

  • I’m backing up my desktop workstation (which I’ll refer to as “Host A”) to a locally-mounted filesystem path (triple-replicated GlusterFS cluster) using the CLI via a twice-hourly cron job. For what it’s worth, I don’t currently use the UI. A colleague of mine told me that the question I’m asking here is a bit more obvious when using the UI, but he himself wasn’t 100% confident of his working theory in terms of an answer (hence my post here).

  • Once nightly, I run kopia repository sync-to b2 ... to backup my local working backup set to Backblaze B2 as an offsite replica.

This all works great!

However, I’d now like to add my (Framework) laptop to the mix – for what it’s worth, this machine (which I’ll refer to as “Host B”) runs the same Linux distribution and has most of the same /home working set data, albeit with slightly different dotfile/system configuration (e.g. power management, things that work better on laptop vs desktop, etc…).

The question: am I able to use the same Kopia repository (my locally-mounted filesystem path) to backup this second host (via something like kopia snapshot create $HOME), or does it need to be a separate repository/configuration?

I sincerely appreciate anyone’s time/effort that takes the time to read and address this question!

Multiple clients sharing the same repository is fine. It’s one of main features of Kopia.

@jkowalski Wow, I sincerely appreciate the prompt response! As an aside, you’ve created an incredible tool that myself and my colleagues are obsessed with (to put it lightly) – it’s exactly what we’d been looking for for years!

While you’ve sufficiently answered my initial question already (thank you!), out of curiosity, how does Kopia keep track of “host identities” (e.g. MAC address, local IP, etc…)? I guess my thinking here is, whatever mechanism Kopia uses, I want to ensure a consistent/constant identifier for each machine respectively on my end!

Kopia uses (username,hostname,path) triple to identify snapshots.

Username and hostname are persisted in a config file, which is helpful when the machine is roaming between different DHCP networks (such as the office & airport) and sometimes gets assigned a hostname and sometimes it does not.

You can override them at connect time --override-hostname and --override-username respectively (those flags are hidden, but available).

1 Like