I assumed that you meant the GUI because the GUI binary is actually named KopiaUI.
The sync-to
command can be great because it is rather easy to use but I’m personally not a big fan because it syncs “everything”. I prefer to have 2 separate repositories with different passwords and settings (i.e. policies) like compression, retention, snapshot-interval etc.
If you want to use 2 separate repositories at once you need to create 2 config files. I will try to explain:
When Kopia creates a repository (kopia repo create
) it automatically connects (kopia repo connect
) to this repository. When connecting to a repository, Kopia creates a configuration file (defaults to ~/.config/kopia/repository.config
on Unix) which contains necessary information like repository type, repository location and cache location. Kopia is always using this configuration file unless you are using the --config-file
flag.
Kopia aswell creates a file that contains the hashed password for this repository. The file needs to be in the same directory as the configuration file and named the same plus a kopia-password
suffix (repository.config.kopia-password
by default). If this password file is missing and you didn’t specify an environment variable, Kopia will ask for the repository password for every command.
Your initial repository should already be connected so you can rename this configuration file to a more distinct name:
rename repository repository_one ~/.config/kopia/repository.config*
Then create your second repository:
kopia repo create filesystem
Now you should have 4 files:
ls .config/kopia/
repository.config repository.config.kopia-password repository_one.config repository_one.config.kopia-password
repository_one.config
corresponds to your initial repository and repository.config
corresponds to your new repository.
If you are now using kopia (e.g. kopia snap create
) without using the --config-file
flag, it will automatically use you new repository. By using the --config-file
flag (e.g. kopia --config-file=~/.config/kopia/repository_one.config snap create
), you can use your initial repository.
This should work for basically everything, even for sync-to
:
kopia --config-file=~/.config/kopia/repository_one.config repo sync-to from-config ~/.config/kopia/repository.config
I hope this explanation makes sense and clarifies the general use of multiple repositories on the command line.