KOPIA_CONFIG_PATH not effective in KopiaUI?

Hi, a new user here. I’ve been using Kopia for a while and like it very much. Thank you to everyone involved.

The following may be something I don’t understand correctly, but I’ll ask anyway. I’m using Kopia 0.10.7 on Windows 10.

It seems to me that the KOPIA_CONFIG_PATH environment variable has no effect with KopiaUI. I tried to set these environment variables:

KOPIA_CONFIG_PATH [path]\xyzzy.config

While using Kopia command line all those variables were effective: the repository was connected using xyzzy.config and logs and cache were written where I pointed them to in the variables.

Then I started KopiaUI, and it connected nowhere. It only presented me with the “Select Storage Type” window, so I manually filled up the storage configuration (an SFTP server in this case) and connected there. After checking out what effect the environment variables may have had, I figured out that KOPIA_LOG_DIR and KOPIA_CACHE_DIRECTORY were still working as expected.

Unfortunately KOPIA_CONFIG_PATH was not: the config file was written into the common user %APPDATA% directory as repository.config (or repository-<unix_timestamp>.config, if one existed already). In no way could I make it write or use the config file in the KOPIA_CONFIG_PATH location.

In practise this means that with KopiaUI you are restricted to use config files in the user %APPDATA% directory only. You cannot point it to another location using --config-file as with the command line utility, and now it seems KOPIA_CONFIG_PATH has no effect either.

Maybe this is how it’s supposed to work, but I’m still a little confused.

KopiaUI launches one instance of kopia as subprocess and forces particular config path, so that’s by design.

BTW If you run kopia server, you’ll be able to access pretty much the same UI as KopiaUI (except few minor differences).

OK, thanks for the answer. Fair enough, I can live with that. I haven’t dived into kopia server yet, and I’m not sure if I will in the near future.

I’m still curious to know what’s the reason for KopiaUI to force the config path.

I suspect it is because you can run multiple instances of KopiaUI to connect to different repos, and each instance of KopiaUI creates its own config file. Having a preset location for the config file simplifies the process, but I do not see why someone couldn’t submit a PR for custom config path for KopiaUI.

Well, I certainly wouldn’t mind having the ability to set the config file location in KopiaUI, too. After all it only should follow this particular environment variable like it already does with at least some of the other ones. But as long as I don’t know the exact reasoning for this behavior, I’m not sure if it’s serious enough for submitting a PR, for me at least. Of course it’s possible I could change my mind later… :grin: