Best practice forum (Archived)

Error in scheduled backup of courses

 
? ?
Error in scheduled backup of courses
de ? ? - Thursday, 19 de January de 2012, 14:31
 

Hi,

I'm getting an error in scheduled bakcups of courses - one course is not backing up and breaking the cron script.

Error from the Totara error log:

1326978004    1.1.3    20111109.00   a:4:{i:0;i:1024;i:1;s:651:"Incorrect string "needed" in $status->info, please fix the code (table:user; old_id:10330).<ul style="text-align: left"><li>line 585 of backup/lib.php: call to debugging()</li><li>line 3260 of backup/backuplib.php: call to backup_getid()</li><li>line 757 of backup/backuplib.php: call to write_role_assignments_xml()</li><li>line 616 of backup/backup_scheduled.php: call to backup_course_start()</li><li>line 230 of backup/backup_scheduled.php: call to schedule_backup_course_execute()</li><li>line 129 of backup/backup_scheduled.php: call to schedule_backup_launch_backup()</li><li>line 550 of admin/cron.php: call to schedule_backup_cron()</li></ul>";i:2;s:38:"/var/www/html/totaralms/lib/weblib.php";i:3;i:7060;}            0ffd3fc689ec6117b1dde4a92c17f61a  998

1326978005    1.1.3    20111109.00   a:4:{i:0;i:1024;i:1;s:664:"Incorrect string "needed" in $status->info, please fix the code (table:user; old_id:10330).<ul style="text-align: left"><li>line 585 of backup/lib.php: call to debugging()</li><li>line 2205 of backup/backuplib.php: call to backup_getid()</li><li>line 1907 of backup/backuplib.php: call to backup_gradebook_grades_history_info()</li><li>line 705 of backup/backup_scheduled.php: call to backup_gradebook_info()</li><li>line 230 of backup/backup_scheduled.php: call to schedule_backup_course_execute()</li><li>line 129 of backup/backup_scheduled.php: call to schedule_backup_launch_backup()</li><li>line 550 of admin/cron.php: call to schedule_backup_cron()</li></ul>";i:2;s:38:"/var/www/html/totaralms/lib/weblib.php";i:3;i:7060;}            0ffd3fc689ec6117b1dde4a92c17f61a  1068

How can I fix this to restore the cron script to run again?

When I try to run the cron script manually through the site, I just get a blank screen.

-Ira

 

Simon Coggins
Re: Error in scheduled backup of courses
de Simon Coggins - Friday, 20 de January de 2012, 01:24
Grupo Totara

Hi Ira,

Could you try making a manual backup of that course and see if it works, or if you get any other errors. If it does work could you send me a copy of the zip file?

You could also try temporarily disabling the scheduled backup for that course to get the cron running while we look into it.

Finally, it would be useful to know what role assignments the user with id 10330 has in that course, as that seems to be what is causing the error.

As an admin, visit: [yoursite]/user/view.php?id=10330&course=1 to find out which user it is, then have a look at the role assignments in the course admin > assign roles page.

Simon

? ?
Re: Error in scheduled backup of courses
de ? ? - Sunday, 22 de January de 2012, 14:29
 

Hi Simon,

I checked the backups server report and the course that was previusly giving an Error status is now showing OK.

Although the front page/general site backup status is Unfinished...

I had a look at the user with ID 10330, they only have a default learner role in 4 courses and NO system wide role. Surely, this wouldn't cause problems

-Ira

 

? ?
Re: Error in scheduled backup of courses
de ? ? - Monday, 23 de January de 2012, 13:28
 

Hi Ira,

The 'Incorrect string "needed" in $status->info, please fix the code' message is a known (and still unresolved) Moodle issue when running backups with developer debug mode turned on, however the backup should work fine if run with debugging turned off.

You were having a few issues with the cron last week, is it working now or are there still outstanding problems?

Ciaran

? ?
Re: Error in scheduled backup of courses
de ? ? - Monday, 23 de January de 2012, 21:29
 

Hi Ciaran,

Does that bug apply to any option above "NONE: Do not show any errors or warnings" for the debug messages setting, or only if set to "DEVELOPER: extra Totara debug messages for developers"?

I have the Display debug messages currently set to No.

I have disabled the automated scheduled backups at the moment, so the cron script will run.

When the cron was crashing, the cron.pid file had to be removed from the moodledata folder manually. Although, as there were still errors/bugs affecting the cron, it would crash again the next schedule run (every 5 mins).

Don't have the time to check if cron is crashing every hour.

Also I never received an email when I had the "Notify Admin" setting ticked for the Cron watcher.

-Ira

? ?
Re: Error in scheduled backup of courses
de ? ? - Wednesday, 25 de January de 2012, 17:23
 

Hi Ira,

Debug set to NONE or MINIMAL should get rid of that spurious error message.

See my post on the other thread for why the cron_watcher is not running properly...if you can alter the way it is being called and check the email addr4ess on the admin user then at least we should get some information on what is causing your remaining cron problems.

? ?
Re: Error in scheduled backup of courses
de ? ? - Monday, 30 de January de 2012, 20:32
 

Hi,

I changed the debug setting to MINIMAL and re activated the scheduled backup - The backup failed for 3 courses and has crashed the cron script again sad

I have attached the server error log

I still haven't managed to get the cron_watcher script call updated in the prod server cronjob, so having to request cron.pid be removed everytime its crashed.

-Ira