Finding which courses use most space (split from Moodle running out of space)

Finding which courses use most space (split from Moodle running out of space)

by Christopher Burger -
Number of replies: 3

I have One Big question ( and sorry for my english) 

But im Still having the Same issue, for some reason for a school with 1000 users, today i having 20 Gb per Day, i dont know if i have some User is uploading something like virus or they are doing something, 

im traying to look up , where i can see a windows like that one but im still Lost , where i can see this informacion 

like : 

The course has more Space used. 

The User is uploading more Information in Bytes or Mb. 

can anyone help me to figurate where i need to Check this?


Thanks in advance. 


Average of ratings: -
In reply to Christopher Burger

Re: Moodle running out of space

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

This is the down side of the intelligent user file management of Moodle. They have their own structure, you can't easily connect them with the courses or activities they originate. There are a whole series of additional plug-ins, mostly from third parties. But before diving in to all that you look at the size of files under moodledata/filedir/ that is where all the uploaded files go.

WARNING: Don't change anything in that cryptic directory tree!

N.B. This is a separate question from https://moodle.org/mod/forum/discuss.php?d=402417. Needs to be a new discussion.

N.B. II. Don't send reminders minutes after a post. This is free advice, given by volunteers. If you have pressing matter, post the reminder as reply to your initial post, not in parallel! You know that the forum post is open 30 min for editing?

In reply to Christopher Burger

Re: Finding which courses use most space (split from Moodle running out of space)

by Ken Task -
Picture of Particularly helpful Moodlers

Your teachers might be making backups themselves and those backups go to their private area ... which admin level user can't see.

So query would help ... query mdl_files table for all .mbz files

mysql -u root -p'pass' -e "use moodle;select userid,contenthash,filename,filearea,filesize,timemodified from mdl_files where filename like '%.mbz' order by filesize DESC;" > backups.txt; cat backups.txt;wc -l backups.txt

Teachers could have multiple backups and some very old ones that could be removed.

Also, if running a version of Moodle that has it, recyclebin and admin has 'cleaned up' site .. removing categories and courses in those categories rather than moving those courses to another category.   For a while until cron job/task moves those recyclebin backups in to trashdir, more space used.

There is a command line utility called 'moosh' that has an option for deleting files which removes them from sea of files in /moodledata/filedir/ *and* updates the mdl_files table.

'SoS', Ken

'SoS', Ken

Average of ratings: Useful (1)