I recently used NextCloud to connect with the S3 storage backend. Today, due to some reasons, I lost the “oc_filecache”. After rebuilding the data table, I lost the data. I tried using it/ The occ file: scanf – all command was used to recover data, but surprisingly, it could not be found.
Is there any way to add this part in the future?
Can you restore your database from your backups?
The oc_filecache
table is a very critical table.
From the sounds of it you’re probably using S3 via Primary Storage (vs S3 via External Storage).
Is that accurate?
Unfortunately, when using S3 via Primary Storage you won’t be able to recreate the filesystem level metadata by just running a files:scan
since there is no underlying source to recreate it from (that’s what the database is serving as)…
See Primary Storage (particularly the Differences from External Storage section).
See External Storage.
Your best bet is going to be restoring your database from your backups.
Strictly speaking, I have recovered from the recent database backup, but this has also resulted in some data loss (i.e. data stored in S3 after this database backup). Is it possible to use a technology in the future to store metadata in S3 storage. If this happens, simply execute the command to import it into the database.
Thank you, JTR.
Wishing you a wonderful day
Yes, the main storage uses S3 storage as the backend
One of the major benefits of Primary Storage (versus External Storage) is performance. If the metadata were stored in the S3 object store and kept up-to-date, it would perform similar to External Storage mode (which does in effect behave the way you’re describing).
One simple solution is to back up your database at least as frequently as you back up your raw S3 object store.
In fact, I really hope to create a detector in the upload interface. As long as the main storage is stored in S3 and data is being uploaded, I would like to add the metadata of the current file to another storage bucket.
When these metadata are needed in the future, simply retrieve the metadata from the storage bucket and input it into the database.
I think this is a very good idea (maybe)
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.