I wish I had read both the wonderful guide by @MichaIng found here as well as this thread before changing the data directory; it would have been an easy fix to manually update the database along with making the change to config.php
.
Alas, here I am with a Nextcloud install that, in light of the information in the guide/thread, seems broken under the hood in some ways. I’ve been poking around in the database, and I do indeed see duplicate entries in the oc_filecache
table pertaining - in a large part - to image previews, but I guess there could be other duplicate entries as well. I’ve also been experimenting a bit with occ files:scan --all
in a Nextcloud install on a VM, but I don’t think it picks up all the preview files either. Which would probably also be strange, since the fileid
of a previewable file corresponds to the name of the preview folder both in file system and database, and hence, with new fileid
's generated by scanning, the old preview folders would be invalid.
For a manual cleanup I’ve been considering removing the outdated entries from the oc_filecache
table, and also manually removing the generated preview folders by using find
and filtering by mtime
/ctime
.
But is there a more correct and/or more comprehensive way to do it?