Affects Version/s: 2.3.6, 2.4.3, 2.5.2
Affected Branches:MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
Fixed Branches:MOODLE_24_STABLE, MOODLE_25_STABLE
Pull from Repository:
Pull Master Branch:
Pull Master Diff URL:
During automated backups, if a course fails with an exception, the cleanup task is not run. This leaves the backup_ids_temp table in place, as well as files etc.
The problem is that next backup cannot start because creation of the temp table will fail (throws exception ddltableexists).
Currently, this appears to affect Moodle 2.5 and 2.4, but not the current master (pre-2.6).
- Set time limit in your php.ini something very large like a day.
- Log in as admin
- Ensure there are multiple courses created on your site.
- Navigate to a course in the middle (not the first or last)
- Add large files to that course so that it contains at least 6GB of media content spread over multiple activities.
- Set the following site configuration settings...
- backup_auto_active - manual
- backup_auto_storage - specified directory
- backup_auto_destination - path to some writeable dir
- Run the script php admin/cli/automated_backup.php
Expected result: Backup of the large course should fail, but others should succeed.
Actual result: Backup of the large course fails, but so do courses that are backed up following it. They fail quickly.
The log of the course backup supports what Tony has described.