Moving nextcloud data volume (docker)

I have a nextcloud container setup with a persistant data volume.

I copied the docker volume content to an external ssd, and created a symlink between old and new location.
When running nextcloud in the browser, I then got right into the setup wizard instead of my usual nextcloud.

I think this has to do with permissions on the SSD.
Is there some precautions regarding permissions on the new location?

Yes… the permissions must not be changed. Timestamps should really not be changed either.

Permission needs to be www-data:www-data and chmod 750 folders and 640 files.

Do you have a reference for symlinking a docker persistent volume like this? I haven’t tried it personally so not sure if that works or not.

1 Like

It seems like a cute way of moving the volume.

I noticed I had a messed up permission on my external SSD.
When I repartitioned and claimed ownership to the partition, I had “normal” permissions.
Copied the files over again.

Then I get this error. So something changed…


Configuration was not read or initialized correctly, not overwriting /var/www/html/config/config.php

Will try to set permissions correct.
Think I’ll handle chmod, but how do you set www-data:www-data?

1 Like

Use chown to change ownership. Make sure to do it recursively. That’s for a docker folder mount or a normal setup. The permissions should probably just be exactly as where you copied from because docker has a complicated mechanism for persistent volumes. Watch for hidden dot files too.