Hey there,
If this is not the correct place to post this issue. I tried to find the correct section but I did not see anywhere you are supposed to post this type of question. If it's not okay to post this here but you know where where I was supposed to post this, let me know and I'll recreate the post in the correct place. Forgive me as I am new to the forum here as well as new to linux.
So before I dive into what I need to do, I will tell the story that lead to this situation.
We currently have 3 Linux Machines running Debian. We are using Portainer.io in a docker swarm configuration. A while back, our NAS that was hosting the database died and we were not able to recover the data and had to restore from the most recent backup. However, our backup appliance was having an issue with restoring the files. Because of this we had to restore the files manually using a linux commands instead of the GUI of our backup appliance(our backup appliance is a linux machine). After restoring the backup, I then had to copy/paste from to our new NAS using windows file explorer. However when I did this, it somehow messed up a whackload of permissions/ownership. We fixed this issue with the rest of our Databases, but there is still one that is broken.
The DB in question is our Wekan DB that was hosted on our NAS appliance. The service in our portainer swarm, is not currently running because the database needs to be repaired, but the repair function wants to take ownership of the files/folders using the chown command. But the problem is that the files/folders are owned by a user on our NAS appliance(this NAS is also a linux machine, synology.) But the command that needs to be ran is a docker command that needs to be ran on one of the linux machines in our docker swarm.
"docker run -it -v /mnt/dockerdata/volumes/wekan-db:/data/db mongo:5.0 mongod --repair"
Because this machine doesn't have the authority to take ownership of the files/folders as they are owned by a linux user from a different linux machine.
"chown: changing ownership of '/data/db/index-144--4087297069838802221.wt': Operation not permitted" this is the output after running the command. This is recursive for every file/folder in the db.
So the task I am faced with is how do I restore ownership of the files/folders on the NAS to a user that exists on our other linux machine in the docker swarm so that the Mongodb --repair command will work, and we can restore our services.
Any help is appreciated. I am all ears. Thanks!
If this is not the correct place to post this issue. I tried to find the correct section but I did not see anywhere you are supposed to post this type of question. If it's not okay to post this here but you know where where I was supposed to post this, let me know and I'll recreate the post in the correct place. Forgive me as I am new to the forum here as well as new to linux.
So before I dive into what I need to do, I will tell the story that lead to this situation.
We currently have 3 Linux Machines running Debian. We are using Portainer.io in a docker swarm configuration. A while back, our NAS that was hosting the database died and we were not able to recover the data and had to restore from the most recent backup. However, our backup appliance was having an issue with restoring the files. Because of this we had to restore the files manually using a linux commands instead of the GUI of our backup appliance(our backup appliance is a linux machine). After restoring the backup, I then had to copy/paste from to our new NAS using windows file explorer. However when I did this, it somehow messed up a whackload of permissions/ownership. We fixed this issue with the rest of our Databases, but there is still one that is broken.
The DB in question is our Wekan DB that was hosted on our NAS appliance. The service in our portainer swarm, is not currently running because the database needs to be repaired, but the repair function wants to take ownership of the files/folders using the chown command. But the problem is that the files/folders are owned by a user on our NAS appliance(this NAS is also a linux machine, synology.) But the command that needs to be ran is a docker command that needs to be ran on one of the linux machines in our docker swarm.
"docker run -it -v /mnt/dockerdata/volumes/wekan-db:/data/db mongo:5.0 mongod --repair"
Because this machine doesn't have the authority to take ownership of the files/folders as they are owned by a linux user from a different linux machine.
"chown: changing ownership of '/data/db/index-144--4087297069838802221.wt': Operation not permitted" this is the output after running the command. This is recursive for every file/folder in the db.
So the task I am faced with is how do I restore ownership of the files/folders on the NAS to a user that exists on our other linux machine in the docker swarm so that the Mongodb --repair command will work, and we can restore our services.
Any help is appreciated. I am all ears. Thanks!