I’m not sure about encryption. I’ve only tested it with the encryption module turned off. Does the new location of the data directory still have the same permissions/ownership that your old directory had? I apologize if I lead you incorrectly. I was not aware there were database changes required.
I am a little confused here. I’ve changed the data directory multiple times without editing the database, and everything continues to work. For testing, the data directory location changes went like this,
1: /private_html/data
2: /private_html/datastorage
3: /private_html/iamgroot
4: /private_html/racoonsarecool
Here are my exact steps.
1: Log out of Nextcloud’s web interface.
2: Move the folder to the new location.
3: Edit config/config.php and adjust the data directory path
4: Run ./occ files:scan --all
5: Log back into the web interface.
My oc_storage table looks like this,

For reference, this is Nextcloud 10. The config.php version says, ‘version’ => ‘9.1.0.16’. Would you mind clarifying the oc_storage changes? I don’t want to be giving people bad advice.