Repository.config is unsollicitated updated

Hello

My repository.config is overwritten every run even i’m manually updating it.

cat repository.config

“caching”: {
“cacheDirectory”: “../../.cache/kopia/28fae893ff376ee2”,
“maxCacheSize”: 5242880000,
“maxMetadataCacheSize”: 5242880000,
“maxListCacheDuration”: 30

then I’m running

kopia cache set --content-cache-size-mb=24000 --cache-directory=/var/exploit/.cache

that is updating the file

cat repository.config

“caching”: {
“cacheDirectory”: “../../../var/exploit/.cache”,
“maxCacheSize”: 24000000000,
“maxMetadataCacheSize”: 5242880000,
“maxListCacheDuration”: 30

Then during backup, i’m connecting to the repo as below
kopia repository connect from-config --file=/root/.config/kopia/repository.config

And the file is overwritten as below (back to initial)

“caching”: {
“cacheDirectory”: “../../.cache/kopia/28fae893ff376ee2”,
“maxCacheSize”: 5242880000,
“maxMetadataCacheSize”: 5242880000,
“maxListCacheDuration”: 30

How can i prevent my repository.config been overwritten or sometimes even deleted ?

I think cache parameters belong to runtime only and are not stored in repo policies. No idea why you connect to your repo before every backup…

But if you have to do it then you can always specify cache parameters in your connect command:

just add --cache-directory and --content-cache-size-mb flags.

Hi,

Of course I tried and that doesn’t change at all.

I need to connect each time because it is offline backup scripts.

Nevertheless, I found the issue with the cache as i mounted the full path as Filesystem that avoid kopia to clean/add/remove the directory, thus throwing error and forcing repository disconnection (that we know remove the repository.config file).