Using an existing config file with fresh ocis container

Hello,

I’m using ownCloud Infinite Scale, but i ran into a problem. I simply changed my tree structure on my server from services/ocis to services/external/ocis, and copying my volumes to the new path. I used named volumes so I docker volume rm those. But now when I start ocis again i have the following error loop:

ocis  | 2023/03/03 08:54:39 Could not create config: config in /etc/ocis/ocis.yaml already exists
ocis  | The jwt_secret has not been set properly in your config for ocis. Make sure your /etc/ocis config contains the proper values (e.g. by running ocis init or setting it manually in the config/corresponding environment variable).

Here is the relevant part of my compose file:

services:  
  ocis:
  #...
    volumes:
      - config:/etc/ocis/
      - data:/var/lib/ocis/
volumes:
  config:
    driver_opts:
      type: none
      device: "${PWD}/ocis-config/"
      o: bind
  data:
    driver_opts:
      type: none
      device: "${PWD}/ocis-data/"
      o: bind

I can successfully sudo cat ./ocis-config/config.yaml and it has my previous config as expected (format looks good).

I have read the relevant part of the documentation:

It looks to me that this only talk about when you have this error and you want to override an existing configuration, not how to do when you want to keep your old configuration.

At this time there nothing really important on my ocis so i can afford to set it up from scratch and lose data. What i’m really worried about is I plan to set up a backup system on my server (I plan to simply copying folder that are used as docker volumes for all my services), and i’m affraid i will get the same error if i have for some reason the needs to use my backup.

Could you please explain me what i did wrong and how to avoid this in the future ?

I may have something wrong, please keep in mind enven though i can use docker i’m far to be an expert and this my first time setting up my own server.

Thanks for your awesome work and your future answers !

For your information, i figured it could be a problem with volumes ownership so i ran sudo chown -R 1000:1000 ./ocis-data and sudo chown -R 1000:1000 ./ocis-config (those are my volumes folders) it seems to be better but i have now an error telling my grpc can’t start and un restart in loop:

2023-03-05T20:39:08.188777146Z INF user idp:"internal" opaque_id:"8636ffc3-e504-4028-a625-855b32836f0b" type:USER_TYPE_PRIMARY  authenticated | service=storage-system pkg=rgrpc traceid=00000000000000000000000000000000 line=github.com/cs3org/reva/v2@v2.12.1-0.20230126045302-72336e6ececa/internal/grpc/services/authprovider/authprovider.go:141

2023-03-05T20:39:08.207989842Z ERR failed to create storage space | service=storage-system pkg=rgrpc traceid=00000000000000000000000000000000 error=xattr.get /var/lib/ocis/storage/metadata/spaces/js/oncs3-public-share-manager-metadata/nodes/js/on/cs/3-/public-share-manager-metadata user.ocis.name: no data available status={"code":15,"message":"error creating space","trace":"00000000000000000000000000000000"} request={"opaque":{"map":{"spaceid":{"decoder":"plain","value":"anNvbmNzMy1wdWJsaWMtc2hhcmUtbWFuYWdlci1tZXRhZGF0YQ=="}}},"owner":{"id":{"idp":"internal","opaque_id":"8636ffc3-e504-4028-a625-855b32836f0b"}},"type":"metadata","name":"Metadata"} line=github.com/cs3org/reva/v2@v2.12.1-0.20230126045302-72336e6ececa/internal/grpc/services/storageprovider/storageprovider.go:497

2023-03-05T20:39:08.209798739Z ERR error starting the grpc server | service=sharing error=unable to register services: rgrpc: grpc service publicshareprovider could not be started,: internal error: error creating space line=github.com/cs3org/reva/v2@v2.12.1-0.20230126045302-72336e6ececa/cmd/revad/runtime/runtime.go:201

2023-03-05T20:39:08.210460797Z INF pid file "/tmp/revad-sharing-824cfc84-8066-41e6-84f3-65fe2e9c9206.pid" got removed | service=sharing pkg=grace line=github.com/cs3org/reva/v2@v2.12.1-0.20230126045302-72336e6ececa/cmd/revad/internal/grace/grace.go:88

Ok so i gave up and set up a fresh instance, i just tried again to setup a backup, this time taking care of using sudo cp -rp to make sure to preserve ownership and permission, but i keep getting the error telling me it can’t start the grpc server. To be honnest i have no idea how to help debug this, i just want to make sure i can backup my ocis instance.

Oh that’s such a pity.
I upgraded my ocis app in truecharts, and now I get this error… I cannot imagine of loosing all my data :sob: :sob: :sob:

Did you ever figure this out?