Course Restore in 2.4 (Database Errors)

Course Restore in 2.4 (Database Errors)

by Graham Stone -
Number of replies: 2
Picture of Testers

Good Afternoon,

I am currently restoring courses in my 2.4 site that have been backed up from my old 1.9.13 site.  So far every course has restored correctly however I have just tried to restore what is probably the biggest course so far (520MB) and am getting the following database errors, 'Error writing to database' and Error reading from database'  

Is there a known issue with restoring large backups?  I seem to remember a recent discussion on here about something similar.

 

Thanks,

Average of ratings: -
In reply to Graham Stone

Re: Course Restore in 2.4 (Database Errors)

by Ken Task -
Picture of Particularly helpful Moodlers

Suggest turning on debugging and try restoring again.

When restoring 1.9.x courses, Moodle will attempt to convert the backup .zip to a version 2 .mbz before restore.  Check your moodledata/temp/backup folder for larger than 0 byte .log files for clues.  0 byte .log files are restores that succeeded ... larger than 0 byte .log files are restores that failed.  Those .log files are text and one should be able to open and view with a text editor.

The DB errors could be an indication one needs to tweak MySQL - max_packets being one.  2 does more ... requires more.

Also check your logs apache error, php error, or mysql logs for hints/clues.

When it comes to MySQL every server/environment is different and while some might be able to provide some generic tweaks to MySQL, you might not be able to apply them.  Much depends upon if you are remotely hosted or not and the package purchased from the hosting provider (shared hosting?).

'spirit of sharing', Ken

In reply to Ken Task

Re: Course Restore in 2.4 (Database Errors)

by Graham Stone -
Picture of Testers

This problem is even stranger than I thought because i have since restored about 20 more courses without this problem including just now a backup that was over 700MB however upon trying to restore the course I was having problems with yesterday again I still got those database errors.  I'm at a loss as to what the problem could be.

For info in case anybody can help our Moodle is hosted internally on a Windows box and is running MySQL.

Thanks,