We have updated our Moodle from 3.7 to 3.9.1
We have automated backups run by crontab command every Saturday morning and it finishes in Sunday afternoon/evening.
We keep 4 weeks backups in Moodledata and in specific directory (.mbz files), we skip courses not modified for 30 days.
So basically every week we make ~2200 backups and it's ~240GB.
But as we keep 4 weeks backups so basically oldest 2200 backups (~240GB) is deleted. As I understand moved to moodledata/trashdir and scheduled task should delete it from trashdir?
We have this setup for years. Currently ~600GB free disk space and this happened second time after Moodle update.
Problem:
This Saturday morning automatic backups started and Sunday afternoon we couldn't login to Moodle (Database reading error), so I checked server via SSH it was 0% space left on disk, then I checked size of moodledata/trashdir it was 600GB there..
In Filezilla I saw that moodledata/trashdir folder has 256 directories. Which is strange to me, because it seems that files are not being deleted fast enough?
We run our cron every 60 minutes.
In scheduled tasks "Cleanup files in trash \core\task\file_trash_cleanup_task" runs every 6 hours by default, and from the logs I see that it was running without problems on Saturday and Sunday.
As I understand this task should delete files from moodledata/trashdir?
So why files are not deleted from trashdir and why it takes so much disk space?
Because as I said we also make .mbz backup files to specific folder (separate disk), so there is no change in that disk space. There is no huge swings in .mbz file size, maybe few GB.
Last week was made 2254 .mbz backup files and 245GB, and two weeks ago it was 2206 files and 236GB
Marius.