Docker Community Forums

Share and learn in the Docker community.

NextCloud + Move a containers host volume

Running NextCloud and managing docker via portainer.

I wish to move the /app/data to my ZFS drive instead (/ZFSPool1/ZFSDocker/) which is on the same docker host machine. No networking involved.

I had an idea of pausing the nextcloud-container to make sure no more writes happen. then do an Rsync or simple move to the ZFSDocker path and then via portainer edit the host volumes and point them to the new location. But since I have very little experience with docker so far I am unsure about this approach.

There’s actual data in the /app/data folder so I want to be careful about this. What is the best approach and how do I go about fixing this?

The left hand side of your screenshot shows that you use bind-mounts for everything, except for default_nextcloud, which is a docker volume. If you execute docker volume inspect default_nextcloud you can see where its data actualy is stored.

If portainer allows to edit the source paths for a stopped container, then carry on. Personaly, I would move the files, IF it exclusivly containers data for the NextCloud container.

Without portainer a change of volumes would require you to remove the old container and create a new container using the same parameters as the old, except the parts you want to alter.

Apparently only way I could set the new settings was to make the edits and hit deploy container, it removes the one in place and makes a new one. I got it up all and running again. Thank you.