backup unfinished for one course

backup unfinished for one course

by Terry Nolan -
Number of replies: 4

Hi,

Our Moodle backups were running fine up until a few weeks ago.  We have 3 courses with basically the same course content but different number of users.

Currently when we run the backup, only 2 of the courses are backed up.  The course with the most users does not back up.  We do not get an error message. 

In the logs it says "02:13 AM:33 zipping files" and that is the last line in the log for that course. The backup then goes on to backup the other 2 courses successfully.    When I try to backup the course manually, it gets to "writing questions and categories" and then it stops.  Again no error message and no zip file is created.

I tried running the manual backup with debug on but still did not get any other error message.

I have contacted our web host about the php.ini file settings but it is hard to tell whether it is timing out or it is memory or there is another cause. I am still waiting to hear back from them.

Any thoughts on how I can troubleshoot this further?  I can't seem to find any other logs to look at to see why it is failing. 

Thank you,

Terry

Average of ratings: -
In reply to Terry Nolan

Re: backup unfinished for one course - update

by Terry Nolan -

I tried running the backup for that course manually and unchecked Quizzes and the backup ran fine.

I tried just backing up the Quizzes and the backup stopped at "Zipping Files".

I looked in the Temp directory and see that it started to create the zip file but it never finishes.

So it seems to be a problem with the quizzes in this course and getting everything zipped.  But I'm not sure where to go from there smile

Terry

 

In reply to Terry Nolan

Re: backup unfinished for one course - update

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Terry,

It does sound like you have a timeout problem. I'm not so knowledgeable on backups, however I obtained the following solution from the ultimate backup expert, Eloy:

Change the line

@ini_set("max_execution_time","3000");

in moodle/backup/backup.php to

@ini_set("max_execution_time","0");

The change results in no max execution time i.e. the backup script is allowed as much time as needed to finish.
In reply to Helen Foster

Re: backup unfinished for one course - update

by Terry Nolan -

Helen,

Thank you.  I am going to give that a try.  The web host said they would try changing the mem limit for php. 

They do not have an external zip program on the server, so I cannot try that.

Hopefully the change to the backup.php will work.

Terry

In reply to Terry Nolan

Re: backup unfinished for one course

by Michael DePalma -
I am having the same problem as Terry, except updating the execution time did not help. I can backup the course if I do not select all of the quizzes, but if I do select the quizzes I receive an error as soon as the last question in backed up. Here's the last bit of code that I see:




<IMG src="http://(myMoodleServer)/moodle/file.php/264/ExamImagesandMP3/exam_Wetter_Unit_Exam/takeawalk.gif" alt="" align="bottom" border=0>
changed to
<IMG src="$@FILEPHP@$/ExamImagesandMP3/exam_Wetter_Unit_Exam/takeawalk.gif" alt="" align="bottom" border=0>

Any ideas? Thank you!