Move data directory and clean up oc_storages and oc_filecache


#1

I have to move my ownCloud data directory. I found the following FAQ describing the general procedure: https://doc.owncloud.com/server/admin_manual/maintenance/manually-moving-data-folders.html

It says that the local:: entries in oc_storages have to be updated. When I examined my database, I found that two such rows exist and there are about 100-200 rows in oc_filecache linked to these oc_storages rows. (I don’t use external storages.) However, it seems to me that they are not actually used for anything. The server currently has about 100,000 files in the data directory and all files are accounted for in the oc_filecache table linked to the respective user’s home:: storages. This leads me to believe that these local:: storages are leftovers from old ownCloud versions. If so, would it be save to delete them and the corresponding rows in oc_filecache and only update oc_accounts.home to move the data directory?

Server configuration

Operating system: Ubuntu 16.04 LTS

Web server: Apache 2.4

Database: MySQL 5.7

PHP version: 7.1

ownCloud version: 10.1