In preparation for moving to a smaller server I wanted to adjust the automatic course backup settings to reduce the amount of disk space being used. Our previous settings were:
· Maximum number of backups kept – 4
· Delete backups older than – Never
· Minimum number of backups kept – 1
· Skip hidden courses – Yes
· Skip courses not modified since – 30 Days
· Skip courses not modified since previous backup – No
The backups have been running as expected. The system is keeping the four most recent copies of each course and creating new copies of current courses on a schedule of 4 times per week.
The change that I made was to set Delete backups older than = 120 Days. What I expected was that the system would delete all but the most recent copy of backups prior to mid-February of 2022. Instead, what I’m seeing is that I have multiple copies of backups going all the way back to 2020. For example:
-rw-rw-rw-. 1 root apache 279M Nov 14 2021 backup-moodle2-course-53-20211114-0113.mbz
-rw-rw-rw-. 1 root apache 279M Nov 15 2021 backup-moodle2-course-53-20211115-0117.mbz
-rw-rw-rw-. 1 root apache 279M Nov 17 2021 backup-moodle2-course-53-20211117-0117.mbz
-rw-rw-rw-. 1 root apache 279M Nov 19 2021 backup-moodle2-course-53-20211119-0119.mbz
I’ve looked back through the logs and found entries for backups being created but nothing referring to deletions. What am I overlooking? Could the Skip Courses settings be overriding the deletion settings?
Environment
Moodle 3.11.6+ (Build: 20220322)
CentOS 8 Stream
PHP 7.4.30
mysql Ver 15.1 Distrib 10.3.28-MariaDB
Apache 2.4.37