HELP: Course Restore Fails

HELP: Course Restore Fails

by Clive Gould -
Number of replies: 18

Hi

I'm trying to restore a relatively large course backup (56MB) from last year's VLE to a new course on this year's VLE.

I am using the default settings and trying to copy over users accounts and both user and course files.

It gets as far as restoring the course files and appears to stop:-

Copying course files...

When I go to the course on the new VLE the restore is incomplete, with some file icons present but no accompanying text sad

If I try the restore a second time it corrupts the VLE frontpage angry

Fortunately I was able to restore the new VLE from last nights backup so no harm was done smile

I have tried this several times re-creating the backup before trying the restore, but the effect is the same.

We have successfully restored many other different courses - its just this one that fails to restore.

We are using Moode 1.9.5 for both VLEs.

Suggestions most welcome.

Thanks

Clive

Average of ratings: -
In reply to Clive Gould

Re: HELP: Course Restore Fails

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
With 1.9.5 you can break the back up into bits first - have you tried that; might make backing up and restoring easier. Alternatively if you have ftp access have you tried unzipping offline and then ftping the course into the new Moodle?
In reply to Mary Cooch

Re: HELP: Course Restore Fails

by Clive Gould -
Thanks Mary smile I'll give your suggestions a try ... mind you I've already tried both direct server side filesystem copies and rsync to transfer the offending zip file and it still won't restore.
In reply to Clive Gould

Re: HELP: Course Restore Fails

by Clive Gould -

I have tried manually backing up and restoring the offending course as a new course on the same VLE.

1) If the back up includes both course and user files the restore fails to complete properly sad

2) If the back up includes course files but not user files the restore is successful approve

Any ideas why this happens ???

In reply to Clive Gould

Re: HELP: Course Restore Fails

by Clive Gould -

A bit more detail:

Sorry it is the inclusion of user data, not user files, in the manual backup that appears to be causing the problem in the restore.

When user data is included in the backup and the restore fails it freezes immediately after the line:

  • Creating course modules

In reply to Clive Gould

Re: HELP: Course Restore Fails

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Have you tried enabling experimental split restore in Site admin>experimental and seeing what effect that has on the back up and restore?
In reply to Clive Gould

Re: HELP: Course Restore Fails

by Neil Birt -
I am also experiencing the same problem.

We are on 1.9.5+ and just did an upgrade from 1.9.2+ a month ago. We never experienced this problem under that setup. Now it is more or less to restore user data.

This is a pretty serious problem for us as we occasionally have to move forum discussions from one course to another. As far as I know backup/restore is the only way to accomplish this.

What makes it particularly frustrating is that there does not appear to be any details associated with the error. I have checked logs, debugging and the backup file. There does not seem to be any indication that anything is wrong or why the restore of user data fails.

As an aside, I have seen this issue mentioned in several other recent discussions in this forum and there does not appear to be a satisfactory solution so far.

Any ideas as to why this would single out user data?

Thanks
In reply to Neil Birt

Re: HELP: Course Restore Fails

by Scott Krajewski -
We're experiencing this with some specific courses. We're Moodle 1.9.5+ (Build: 20090701)

Many courses are restoring fine. We restore without user data 95% of the time.
Two large courses (one 46MB and one 37MB) gave me trouble today. The 46MB course did complete after a long time -- seemed like 30 minutes. I actually forgot the browser tab was open and noticed it had completed long after I started. Most courses restore in 30 seconds or less, even large ones. I restored a larger one, 68MB, just fine this morning. I suspect size isn't the issue.

It seems to be reproducible on specific courses but I have yet to tell why it's happening with specific courses (nothing is jumping out at me as obviously wrong).

The 37MB course is still stalling out -- looks like after "Creating events." After running for a long while, 20 minutes maybe it stops. The restore log has some suspicious dates such as

"Events - MID-TERM EXAM
TIMESTART was Sunday, 4 December 292277026596 TIMESTART is now Monday, 23 December 1968"

I'm trying doing backups of just assignments, just forums, just resources but am experiencing the same stalling. It doesn't appear I can not backup the events.

The 46MB course also had course events but those were translated OK. The events are look suspicious to me now.

--S
In reply to Scott Krajewski

Re: HELP: Course Restore Fails

by Scott Krajewski -
I turned on debugging and got

Fatal error: Maximum execution time of 3000 seconds exceeded in /srv/www/htdocs/moodle2009/lib/moodlelib.php on line 1305

That's in function usergetdate at getdate($time). It smells like the event dates might be an issue.

So I edited out the EVENTS from the moodle.xml file and it breezed past events into the Assignments and now is stalled on an assignment partway through all of the assignments.

-- S
In reply to Scott Krajewski

Re: HELP: Course Restore Fails

by Scott Krajewski -
Removing the events from the stalling courses moodle.xml file seems to be curing it. Of course this means the course events are lost.

-- S
In reply to Clive Gould

Re: HELP: Course Restore Fails

by Arthur Georges -
Has anyone found a fix for this. I am having this problem migrating my courses from one site (ecology.lamsinternational.com/moodle V1.9.3) to another (piku.org.au/moodle V1.9.6).

Restore stalls half way through.
In reply to Arthur Georges

Re: HELP: Course Restore Fails

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 Arthur,

What error message do you obtain when you switch on debugging to developer (as described in Debugging)?
In reply to Helen Foster

Re: HELP: Course Restore Fails

by Arthur Georges -

Set debugging on (to developer) and tried a restore -- hung again. Got this message. Not that helpful?

Arthur

Course restore: biometry-02_migrate.zip

  • Creating new course
    • Univariate Descriptive Statistics (Biometry-02)
    • Category: Biometry
  • Creating the Restorelog.html in the course backup folder
  • Creating users
    . . . . . . . . . . . . . . . . . . . . . . . . (New: 0, Existing: 83)
    • Students: 0
    • Teachers: 0
  • Creating groups
  • Creating sections

    <div style=\"text-align: center;\"><font size=\"4\"><span style=\"color: rgb(153, 0, 0); font-weight: bold;\"><font size=\"5\" style=\"color: rgb(0, 0, 153);\">University of Canberra<br /><br /></font>Statistics for Ecology and Natural Resource Management<br /><font size=\"5\" style=\"color: rgb(0, 0, 0);\"><br />Univariate Descriptive Statistics</font><br /></span></font></div><font size=\"4\" style=\"color: rgb(153, 0, 0);\"><span style=\"font-weight: bold;\"><br /></span></font> <div style=\"text-align: center;\"><font size=\"4\" style=\"color: rgb(153, 0, 0);\"><span style=\"font-weight: bold;\"><img title=\"smile\" alt=\"smile\" src=\"\" /> Welcome! </span></font><img title=\"smile\" alt=\"smile\" src=\"\" /><br /></div> <div style=\"text-align: left;\"><br /><img hspace=\"0\" border=\"0\" align=\"right\" vspace=\"0\" style=\"width: 221px; height: 141px;\" title=\"Sponsor logos\" alt=\"Sponsor logos\" src=\"$@FILEPHP@$/fish_logos.jpg\" />Cost: $US100.00<br /></div>Start Date: February 21, 2007<br />Tutor access: 14 days<br />Load: Equivalent to a 2-day short-course<br />
    changed to
    <div style=\"text-align: center;\"><font size=\"4\"><span style=\"color: rgb(153, 0, 0); font-weight: bold;\"><font size=\"5\" style=\"color: rgb(0, 0, 153);\">University of Canberra<br /><br /></font>Statistics for Ecology and Natural Resource Management<br /><font size=\"5\" style=\"color: rgb(0, 0, 0);\"><br />Univariate Descriptive Statistics</font><br /></span></font></div><font size=\"4\" style=\"color: rgb(153, 0, 0);\"><span style=\"font-weight: bold;\"><br /></span></font> <div style=\"text-align: center;\"><font size=\"4\" style=\"color: rgb(153, 0, 0);\"><span style=\"font-weight: bold;\"><img title=\"smile\" alt=\"smile\" src=\"\" /> Welcome! </span></font><img title=\"smile\" alt=\"smile\" src=\"\" /><br /></div> <div style=\"text-align: left;\"><br /><img hspace=\"0\" border=\"0\" align=\"right\" vspace=\"0\" style=\"width: 221px; height: 141px;\" title=\"Sponsor logos\" alt=\"Sponsor logos\" src=\"\" />Cost: $US100.00<br /></div>Start Date: February 21, 2007<br />Tutor access: 14 days<br />Load: Equivalent to a 2-day short-course<br />

  • Creating categories and questions
    • Category "Module 2"
      . . . . . . . . . . . . . . . . . . . .
      . . . .
  • Copying user files
  • Copying course files. . . . . .
In reply to Helen Foster

Re: HELP: Course Restore Fails

by Arthur Georges -

Helen,

Tried again with a different course and got

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 77 bytes) in /var/www/moodle/lib/xmlize.php on line 53

Changed memory limit in php.ini

memory_limit = 256M  [was 16M]

The restore got further, but again stalled.

. Creating course modules
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 24 bytes) in /var/www/moodle/lib/xmlize.php on line 53

Seems that 24 bytes exceeds 256M somehow?


Maybe this helps?

Arthur

In reply to Arthur Georges

Re: HELP: Course Restore Fails

by Arthur Georges -

Helen et al.

With this problem, it seems that increasing the memory in php.ini does not help, as the upload is insatiable.

I had a look at some other forums and the questionnaire module seems to be the culprit. So I cleared the Quizzes of all responses (only 29-181 responses per quiz, so not a lot), then backed the course up on lamsinternational and restored it on piku.org.au and it all worked fine.

So I suppose if you do not want to port responses to quizzes, this is a fix. But it is a bit rough. Can we put this problem across to a developer. Seems from the forums that a lot of people are having this problem. New to this, so do not know how.

All the best,

Arthur

In reply to Arthur Georges

Re: HELP: Course Restore Fails

by John Fitchett -
Hi Arthur
We are having the same problem, but with courses that do not contain any questionare module questions.

When you said you the problem was with the questionaire module, do you mean you uninstalled it from the Moodle site to solve the problem? Or just not keep the responses students gave to the questionnaires in the courses you were restoring??




In reply to John Fitchett

Re: HELP: Course Restore Fails

by Arthur Georges -
John,

No I did not uninstall the Questionnaire module. I went into each quiz and deleted all of the student responses. From what I read on various forums, the Questionnaire module is a memory guzzler during restores, in some cases increasing memory limits in PhP to extraordinary levels did not solve the problem. In my case, increasing the ram allocation to my modest maximum of 512 Mb was not enough even though the largest number responses to quiz questions was only 181.

The other reason I suspected the Questionnaire module is that I did a partial restore, step by step, and the error occurred only during the restore of the quizzes.

There were a number of things that got in my way. Maybe one of the others is causing your problems. This is what I did.

I made a number of changes to the PhP configuration to allow uploads of the backup zip files (increase the upload limit from 2Mb to 20 Mb), increase the PhP maximum execution time to 600 to avoid premature timeouts, and increased the memory allocation to tasks from 16Mb to 512Mb.

>sudo nano /etc/php5/apache2/php.ini
Config file to read [altering existing entries].
upload_max_filesize 20M
max_execution_time = 600
post_max_size = 20M
memory_limit = 512M [from 16M]
>sudo apache2ctl restart

Inadequate execution time or inadequate memory limit might be what is plaguing you in the absence of any quizzes.

Helen gave me a really good pointer about switching on the Moodle debugging, which I did not know about.

I guess it will be sensible, once I have finished the migration, to bring the memory limit back down to a reasonable figure.

I am new to this, having only set up a new Linux server for the first time in the last 10 days, so on a steep learning curve. Apache OK, MySQL OK, Mail server fine, Moodle a bloody nightmare. Good thing it delivers so well for me at the student level. smile

Hope this helps,

Arthur

In reply to Arthur Georges

Re: HELP: Course Restore Fails

by John Fitchett -

Thank you Arthur! That is most helpful.

I will take a look at the areas you suggest.

John

In reply to John Fitchett

Re: HELP: Course Restore Fails

by Roger Emery -
Any progress on this or a tracker bug number?

I have similar problems with backed-up courses (1.95) not restoring. I want to specifically restore quizzes, which is all I select during restore.
However I no longer have the original courses to refer to, only various back-ups.
Tried a few different back-ups of the same course, with the same problems as reported - so effectively I now don't have any usable back-ups!