Issue of the topic: I struggled today to update my openhabian installation from 4.0.2 to 4.3 see here. However, as this is not resolved I tried to set up a new OH4.3 within a docker container. This works so far and OH4.3 is booting up nicely.
Now I wanted to restore my backup from my previous openhabian installation to the docker container. I managed to copy the file from the Rasperry Pi to the Docker conainter and unpacked it.
It tried with
cp -r
to copy the folders conf and userdata into the right path in the docker container. However, as in the docker container openhab is running it seems like that the files are not getting overwritten.
It tried also with
mv
but there I get a permission denied.
How do I correctly restore the backup within the docker container?
You need to provide more information. What user is openHAB running under in the container? What user owns the files and folders mounted into the container as volumes? What user owned the files when the backup was created?
By default, unless you pass in the USER_ID environment variable when starting the container, OH runs as use 9001. Therefore user 9001 needs to have read/write permission, preferably also ownership, over all the files and folders passed in for userdata and conf.
You probably do not want to include userdata/tmp and useradata/cache when you copy over your backup.
I don’t think that is what @Christian_Feininger is doing. They were previously running OH on openHABian. There is something wrong with that instance after upgrading to OH 4.3 (see the link posted above).
Until that gets fixed, OP is trying to set up a new instance of OH using Docker on their NAS. I don’t think they are trying to set up openHABian inside a Docker container. On this thread I don’t think openHABian is involved (it probably shouldn’t have the openHABian tag).
@rlkoshak you are absolut correct. I am just trying to set it up as a docker on my NAS as a second backup scenario. I will check your hints and let you know. I removed the openhabian label, which was indeed a mistake on my side.
Well, I still this is valid. I made a backup from the configuration which was running on openhabian. As I do have problems with the migration with openhabian from OH4.0.2 to 4.3 as mentioned here, I was trying to setup a second independet instance in Docker on my NAS where I wanted to install the configuration which was running before on openhabian.