We're about to see a big increase in Moodle usage as all our classes move online. I want to free up disk space on our storage drive, which is nearly full. Unfortunately, Moodle doesn't really seem to delete things when you delete them, or at least the disk usage on the mounted file store never decreases. I'm trying to backup old courses before deleting them, but this actually increases disk usage. I'm mostly using moosh commands to automate things and we're on Moodle 3.2. Here's what I've been doing:
- identifying courses to backup, then running `moosh course-backup $ID`, zipping together all the course backups, moving the archive to permanent storage, removing the individual course backup files
- this appears to create a number of "mbz" Moodle backups in the "files" database table even though moosh's backups were in a different location, so now I have to track those down and delete them with `moosh file-delete $ID` then follow up with `moosh file-delete --flush` to empty the trashdir
- in the admin interface, delete the parent course category for that semester and when it asks what to do with child objects select "delete all - cannot be undone"
Am I missing something? Why does the disk usage stay the same or even increase after these activities? Are related files like assignment submissions not deleted when a course is deleted? And if so, how would I go about finding and actually deleting these files (not just moving them to the trashdir but actually removing them from the disk)? Please help!