I can reproduce this issue. It might have something to do with my environment, but I think it bears some further testing...
Here is what happens....
If you upgrade to 3.1, and wish to bring over your courses from a previous version (mine was 2.9.2), you naturally create a backup file in the previous version and then upload it to moodle. Unfortunately, I could not upload it directly in the moodle interface because my site only allows uploads of 64MB max.
So, I chose to ftp the files to a respository folder in moodledata and then created a repository instance.
When I then try to restore the course (
More information about this error