Moodle 3.1.5 database and moodledata clean up

Moodle 3.1.5 database and moodledata clean up

by mihail pozarski -
Number of replies: 2

Hi,

I am the administrator of a moodle 3.1.5 platform from a university which has 13.000+ active users and it has been online since 2004, the problem is that both the database(36GB) and the moodledata(2.0TB) are huge. is there any way to get rid of the old data like courses, files, activities, etc. that are 3+ years old ? the plan is to take all this data to a back up server, and leave moodle with 2-3 years of information.


i hope you could help me.

Average of ratings: -
In reply to mihail pozarski

Re: Moodle 3.1.5 database and moodledata clean up

by William Stewart -

Mihail,

There are a few simple things you can do may make it smaller. I don't know how much, but consider at least the following:

1) Legacy Files

-These are from version 1.9 and earlier. In theory, you might have a lot of courses with tons of legacy files just taking up space. Many may not be used, others should indicate if they are linked to something. You'll want to delete the unlinked ones. There's no great way to do this except to review each course one by one. I was able to size down our Moodle installation by about 75% doing this. 

2) Unused Course Content

-Perhaps you can simply remove unused course content, scale down certain files like mp3's, large pdfs, ppts, etc., or host other media files (e.g., videos) on elsewhere (like YouTube or Google Drive) rather than inside of Moodle. 

3) Logstore

-This goes back to Moodle 2.7 I think, but in any case, it adds up over time. If you look in PHP myAdmin, you can see how big the log store table is. YOu can make a backup of this table or database for record keeping and purge the logstore. In my case, the logstore was about 90% of our database. I set it to keep records for 3 months versus indefinitely, and we keep a copy of our Moodle site as a whole at the end of every quarter for record keeping.


I'm confident others will have a lot more advice-the site I manage is very small but has been operating since 2007 ish.

In reply to William Stewart

Re: Moodle 3.1.5 database and moodledata clean up

by mihail pozarski -

William,

thanks for your fast answer.

I have the log store table set to keep records from 6 months, although it still uses 6gb of space its not a big deal for the infrastructure, the biggest problem i have are the files. But as there are 29312 courses and 6058805 files in the platform it would take to long if i started reviewing each course one by one. Please let me know if you come across a more massive way of doing this.

Once again thanks for your help!