How to check space used by private files (site wide)

How to check space used by private files (site wide)

per Susana L.,
Number of replies: 2
As a moodle admin I want to understand if users have been using their private files area. What's the best way to check private files usage on Moodle 2.7 (and Moodle 3.1,3.2)
Thank you!
Average of ratings  -
In reply to Susana L.

Re: How to check space used by private files (site wide)

per Davo Smith,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers

If you want to see what private files exist on the system, then you can take a look in the mdl_files database table. If you search for: component = 'user' and filearea = 'private', then that will give you a list of all files stored in the private files area (the filesize field will tell you how much space they take up). Be aware that if any of those files are used elsewhere on the system, then having them in private files as well will take up no further storage space, other than the few bytes for the database row (as Moodle only stores the content of any file once - all files with the same content are a reference to the same file on the server).


Average of ratings Useful (2)