Hi all. Seeking the wisdom of the crowd on this.
Have you ever found yourself in a situation where doing the right thing actually makes things worse? This is where we found ourselves when we attempted to replace high-resolution images with a smaller alternative.
One of our Moodle developers had inadvertently uploaded very high-resolution images of large file size (4MB+ per image). This resulted in excessively large MBZ backup files (350MB) which were too large to ship to another Moodle implementation and restore, as it exceeded the 200MB limit.
When the error was detected, we methodically went through every image and replaced it with a smaller format version. This process took many hours, but unfortunately, the backup file size INCREASED(!!!). This was because Moodle retains the unused files
Even worse, these unused files are also copied into the MBZ file (for reasons that make no sense to me).
The only way to rectify this was to methodically go through every single Moodle screen and manually delete the unused files.
- Edit any on-screen content
- Click on the file manager icon in the ATTO editor
- Notice the unused files. Observe that these files are orders of magnitude larger than the files that are in use
- Delete the unused file(s)
- Repeat step 1-4 on each and every Moodle interface where there is an ATTO editor (every single label, book, chapter, page, assignment, quiz, discussion, post, lesson, etc etc.)
After about a day of effort, the final backup size was reduced from 346MB down to 15MB (23 x smaller!!!!).
Clearly, it is unsustainable to invest this amount of time per course. Is there a smarter way?