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

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

by 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)

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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)
In reply to Davo Smith

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

by Susana L. -
Thank you, Davo. That was really helpful!