Cleaning up moodledata (18GB)

Re: Cleaning up moodledata (18GB)

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

Filedir of Moodledata isn't really 'browsable' where one could see humanly recognized file names.   There might be a plugin, that will help a little, but probably not as much as you'd like.

Really getting to 'see' what's in there involves a DB query of mdl_files for contenthash, filename, filesize, component to get the meta data.   Just because there's a reference in DB, however, doesn't mean there are not orphaned files.

Might help some:

https://moodle.org/plugins/report_filetrash

Also a command line tool called 'moosh'.

https://moosh-online.com/

Look at commands:

https://moosh-online.com/commands/

and you'll see quite a few related.

Running your cron frequent enough?   One task of the main cron is to empty the trashdir in moodle data.   Files might get placed in trashdir from filedir when courses are deleted (if no other courses link to those flies), when students are removed, etc.

Are you running autobackups?

'spirit of sharing', Ken