Moodle 2.4 backups failing

Moodle 2.4 backups failing

by Chris Lewis -
Number of replies: 4

We just started running into a strange issue with our automated backups. I noticed they stopped running a few nights ago and after digging into the logs I have found the error but I cannot find what it means.  The backups stop on one course with the error: 

Default exception handler: error/setting_already_added Debug:
Error code: setting_already_added
$a contents:
* line 342 of /backup/util/settings/base_setting.class.php: base_setting_exception thrown
* line 101 of /backup/util/settings/backup_setting.class.php: call to base_setting->add_dependency()
* line 11 of /blocks/quickmail/backup/moodle2/backup_quickmail_block_task.class.php: call to backup_setting->add_dependency()
* line 188 of /backup/moodle2/backup_block_task.class.php: call to backup_quickmail_block_task->define_my_settings()
* line 132 of /backup/util/plan/base_task.class.php: call to backup_block_task->define_settings()
* line 60 of /backup/util/plan/base_plan.class.php: call to base_task->set_plan()
* line 192 of /backup/moodle2/backup_plan_builder.class.php: call to base_plan->add_task()
* line 99 of /backup/moodle2/backup_plan_builder.class.php: call to backup_plan_builder::build_course_plan()
* line 163 of /backup/util/factories/backup_factory.class.php: call to backup_plan_builder::build_plan()
* line 62 of /backup/util/plan/backup_plan.class.php: call to backup_factory::build_plan()
* line 357 of /backup/controller/backup_controller.class.php: call to backup_plan->build()
* line 126 of /backup/controller/backup_controller.class.php: call to backup_controller->load_plan()
* line 374 of /backup/util/helper/backup_cron_helper.class.php: call to backup_controller->__construct()
* line 199 of /backup/util/helper/backup_cron_helper.class.php: call to backup_cron_automated_helper::launch_automated_backup()
* line 95 of /admin/cli/automated_backups.php: call to backup_cron_automated_helper::run_automated_backup()

I am not sure what to make of this. If I execute the automated_backups.php by hand (instead of cron, but the user is the same) it works just fine and the course that is causing this error even gets backed up without issue.  Just wondering if anyone here might have an idea as to what is going on here.  Thanks!

Average of ratings: -
In reply to Chris Lewis

Re: Moodle 2.4 backups failing

by Ken Task -
Picture of Particularly helpful Moodlers

I see quickmail_block early on in the bug report.  Suggest checking into permissions/etc. concerning that block in the troubled courses.

Also, as a test, taking just one course that has the issue and removing the quickmail block ... safe to do, I think, cause you can always add it back again.

If you have command line access one could run the automated backups via command line: /moodlecode/admin/cli/  automated_backups.php

Does quickmail block need an update?

'spirit of sharing', Ken

In reply to Ken Task

Re: Moodle 2.4 backups failing

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ... there is an update to QuickMail block:

https://moodle.org/plugins/view.php?plugin=block_quickmail

Just tested on a 2.4 moodle.  Manual backup ran without any errors.

Does your 2.4 indicate there is an update available for it?  If not, then manually install the upgrade.

Fingers crossed, that will fix it! ;)

'spirit of sharing', Ken

In reply to Chris Lewis

Re: Moodle 2.4 backups failing

by Chris Lewis -

Thanks for the the suggestions!  Yes, it was Quickmail that was causing the problems and thanks to Sakshi for pointing me to the tracker.  It looks like the course that it was failing on had two instances of the Quickmail block in the course.  I removed one of them and automated backups ran like a champ last night!  I changed the code in the Quickmail block to only allow one instance in the course.  Thanks for the help!