Hi all,
I am running NextCloud and using AWS S3 to store my files. When I delete files & then purge the trash the files no longer appear in NextCloud as expected. However, the files are never purged from S3. So now, I need to identify the & remove from S3 files whose records are now gone from the DB.
Please tell me there is a painless way to do this.
If there isn’t, what is the best approach?
I thought I’d list all the file objects in S3 then compare those file names with the entries in the fileid column of the oc_filecache table.
For reference all my files in SD are named urn:oid:SOMENUMBER
Where SOMENUMBER is mapped to fileid on the oc_filecache table, I think.
If I read you correctly files are never removed from the S3 bucket, even when it is completely deleted?
To my knowledge the number of oc_filecache > fileid corresponds to the number of the file in your S3 bucket ( urn:oid:[fileid] ).
If what you say is correct I’dd assume a script reading all the files in the bucket and checking if the number exists in oc_filecache > fileid would be the way to go to check for “old crap”?