Course restore error: "Could not restore modules!"

Course restore error: "Could not restore modules!"

by Eric Broach -
Number of replies: 7

Hi All,

I am trying to back up one of our courses and restore it to a new course that we can use for a new training class starting soon. The backup completes successfully, but when I try to restore it to a new course, I get an error message: "Could not restore modules!" and a red box at the bottom of the page saying, "An error has occurred and the restore could not be completed!" I am attaching a screen shot of the error.

We looked on this forum and found some posts that seem to relate to the same problem, but I didn't see any single solution to the issue. Our IT staff did try some of the solutions suggested, though. They tried:

  • Changing settings in the PHP.INI file to "memory_limit = 1024MB"
  • Changing settings in the PHP.INI file to "max_execution_time = 120"
  • Raising memory allocation to 250MB
  • Changing max execution on the server from 300 to 6000

But none of this helped at all, and we are still getting the same error message with any course we try to restore, on both our Development and Production servers.

Does anyone have a solution to this issue? Any help or advice that anyone could provide would be greatly appreciated.

Thanks very much,

Eric Broach

Gexa Energy - Houston, TX

Attachment Course_Restore_Error_-_111209.png
Average of ratings: -
In reply to Eric Broach

Re: Course restore error: "Could not restore modules!"

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

Can you try turning debugging on (see Debugging) and hopefully some helpful error messages will be produced.


In reply to Helen Foster

Re: Course restore error: "Could not restore modules!"

by Eric Broach -

Hi Helen,

I set the debugging setting to "Developer" and then went through the process again, and here is what I got (attached). Note that Moodle says it is creating a "restorelog.html" file in the backup directory, but when I look in that directory I don't see the file. Maybe it's not creating it because of the restore error?

Thanks,

Eric

Attachment Course_Restore_Issue_-_111309.png
In reply to Eric Broach

Re: Course restore error: "Could not restore modules!"

by Eric Broach -

Hi Helen and All,

Does this new screenshot help, or would you really need to look at the restorelog file (which Moodle doesn't seem to be creating)?

Thanks,

Eric

In reply to Eric Broach

Re: Course restore error: "Could not restore modules!"

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Eric,

perhaps... if you want to restore into a new course for the purpose of starting a new training... then you don't need the backup to include user information at all, correct? (enrolments, grades...)

If that's correct, then I'd suggest you to make one backup without user information, by selecting Users = none and deselecting all the "include user information" checkboxes.

That backup file will be much, much lighter than the one including users and I guess it will restore without problems, so you will end with your new course clean and ready to start a new training with it.

The problem is that, by design, restore in 1.9 have some severe memory constraints causing that problem with activities having a lot of data. And quizzes, with all the questions, answers, grades and friends uses to be the main cause for that (see MDL-15489).

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Course restore error: "Could not restore modules!"

by Neil Birt -
Thanks for the information Eloy,

Are say then in effect there is no way to backup a large data course and relocate just that course due to built-in memory constraints?

I have been struggling with errors when relocating forum data and I suspect this constraint to be the cause...
In reply to Eric Broach

Re: Course restore error: "Could not restore modules!"

by Sara McNeil -

Hi Eric,

Did you ever find a solution to your problem? I'm getting the same error message, and I've read through the replies to your initial post and can't see a solution.

I've tried several different ways of backing up and restoring - with user data, without user data, without quizzes, without assignments, etc.

Nothing works. I get the same message over and over.

I did turn on debugging and I've included a screenshot of the debugging text below:

Thanksdebug_backup.gif for any advice,

Sara