Occ files: [scan vs cleanup vs check-cache vs checksums:verify]

Hi All,

Running 10.8.0 on an ubuntu vm with mariadb on an xcp-ng hypervisor.

I’ve ended up in a situation where, for various reasons, I have a load of files (~500gb of them) that I was unable to delete either via the web interface or via the command line so to stop my server from running out of space I finally took the slightly drastic action of manually deleting the files from the filesystem. Not ideal but I needed to do something.

I’m now trying to clear things up and wondered if someone could give some guidance on which of the “occ files:xxx” commands is going to be my friend here. I have read the command line help but that hasn’t really helped me much (it says what they do but I can’t work out which of those I want).

I don’t think I need :check-cache (in fact, I think I need the opposite)
I also don’t think I need :checksums:verify as the files are not there to get the checksum from
I ran :cleanup and that said there were “0 orphaned file cache entries deleted”
I’ve run :scan for all users except the one in question (to see how long it took) and it’s currently running for the user in question.

Is there anything else I should be trying to remove stale entries from the DB that are no longer on the file system?

As a slight aside, I seem to be getting around 250 items per second, not sure how that sounds for storage on SATA3 spinning rust? Anyone have any comparisons?

I’ve just checked and the file system contains just under 1.2 million files so at 250 per second that’s going to take around about 1 hour and 20 mins till it finishes… not sure if I’m going to hit a timeout before then…

That is the correct command.

Sounds normal, it can take quite some time.

Usually, at least on Debian based systems (e.g. Ubuntu), PHP cli has no timeout.

Thanks for the confirmation @eneubauer

It took nearly 4 hours in total but did not timeout and it appears to have cleared up my “phantom” database entries.

Now onto my next task which is working out why;
occ trashbin:cleanup <USERNAME>
when run for a specific user (the one with 1.2m files) always ends with a “the database went away” error.

That’s for another post though I guess.


For the record trashbin:cleanup now finishes in < 1 second rather than waiting 8 hours and timing out so it seems that files:scan has fixed everything for me!!! yay for that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.