Kopia repository sync-to filesystem

Tried to sync location1/repo1 to location2/repo1 after connecting to location1/repo1.
Destination location2/repo1 has no data created yet, but has policy set.

$ sudo kopia repository connect filesystem --path /location1/repo1
$ sudo kopia repository sync-to filesystem --path /location2/repo1

Got this error:
kopia: error: destination repository contains incompatible data, try --help

Both repos were initialised the same way with similar policies.

Sync only works with one repository. You simply make a replica of it. It’s not suitable for merging repositories.

In other words, target needs to be an un-initialized folder?

1 Like

yes, or it must have exactly the same kopia.repository file

Well… the command implies that you already have repository configured at the remote end. It won’t do that for you. So, if you choose “sync-to filesystem”, you will need to have a repo ready on the target. Sure, not the best way to phrase it, but not that bad either. Depends on whether you’re thinking in Kopia’s “terms” or are somewhat mislead by the “filesystem”.

You probably wouldn’t expect Kopia to create you a new S3 bucket on any given provider, if you chose S3 as the target for sync-to, or would you?