moodle.xml not found in root...

moodle.xml not found in root...

by Deleted user -
Number of replies: 1
I've gone through procedures one and two in the docs: making sure the moodle.xml file was in the .zip file and uploading the zip file to the backupdata directory and running the clean xml util to clean it. I've tried restoring from both the parent of (files) and the backupdata directory. I have full Administrator, Course Creator, Teacher roles for this new course. I'm still getting this error when I attempt to restore:

Error checking backup file. moodle.xml not found at root level of zip file.

I know for a fact that moodle.xml is at the root level of the zip file I'm attempting to restore.
Average of ratings: -
In reply to Deleted user

Fixed ! moodle.xml not found in root...

by Deleted user -
After many hours of investigation, I discovered something that is not in any of the documentation that I could find online:

I kept getting "Error checking backup file. moodle.xml not found at root level of zip file." when trying to restore to a new course.

I finally remembered that previously from the Site Administration > Server > System Paths I had put in /usr/bin/zip for the zip and unzip for an external path. The reason I had done this was because I was making a final backup of last semester's courses which contained some large video files students had submitted for an assignment. (In the future, I will just have students post their videos to YouTube and give me a link.)
The creation of the large backup was failing until I put those external paths to zip/unzip in.

However, when I then wanted to restore a backup without users/user data into the new course, I kept getting the error above. I removed the external paths so Moodle would use its own internal zip php ability and my restore worked just as it should.

BTW: The external path to /usr/bin/zip is Zip 2.3 by Info-zip on a RedHat Server v4.1.2-44 hosted by Hostgator.

I don't know how to document this, but this should be in Moodle docs.
Average of ratings: Useful (2)