Please help. I have this error in trying to restore a course I backed up on a different Moodle. When I look in the folder I see a folder of course files and a folder saying groups and a Moodle xml file - so why am I getting this error? The course was backed up in a Moodle 1.7 and I am restoring to a 1.8 but that shouldn't be an issue, I think.
Did you by any chance unzip and then rezip the file? This is dead easy to do on Mac that kindly unzips an archive without asking. If you rezip you have to make sure that the folder is not at the top of the archive... zip the files, not the folder.
It sounds like the xml file is not where is supposed to be, meaning that when you have a zipped file called for example backup.zip, that when you see what's inside it, it should look like this (CORRECT):
onefolderanother folderxmlfile.xmlIf you look inside backup.zip and see this (INCORRECT):
justafolderand then inside justafolder you see:
onefolderanother folderxmlfile.xmlthen that is the problem, and you need to move everything out of justafolder so that the xmlfile.xml is found in the root of the zip file.
yes I think that was it! I just redid it - and restored to another Moodle and it worked this time! Thanks!
I realize I'm replying to a year old post, but it took me a while to figure this out and I thought others might have struggled as well.
When I created a back up of a course (mycourse.zip) and uploaded that to a new moodle. When I tried to restore I got the error message Error checking backup file. moodle.xml not found at root level of zip file.
I saw all the documentation about the moodle.xml file not being on the root level and zipping the files not the folder, but it wasn't clicking.
The part I was missing was I needed to
1) Unzip the backup of mycourse.zip
2) open the folder names mycourse
3) select the folders within the mycourse folder AND the moodle.xml file and create a zip of that (mycourse_new.zip)
4) upload the new zip file - mycourse_new.zip and restore.
That worked like a champ! It seems really easy now that I figured it out, but it was really throwing me and thought others might be helped by this as well
When I created a back up of a course (mycourse.zip) and uploaded that to a new moodle. When I tried to restore I got the error message Error checking backup file. moodle.xml not found at root level of zip file.
I saw all the documentation about the moodle.xml file not being on the root level and zipping the files not the folder, but it wasn't clicking.
The part I was missing was I needed to
1) Unzip the backup of mycourse.zip
2) open the folder names mycourse
3) select the folders within the mycourse folder AND the moodle.xml file and create a zip of that (mycourse_new.zip)
4) upload the new zip file - mycourse_new.zip and restore.
That worked like a champ! It seems really easy now that I figured it out, but it was really throwing me and thought others might be helped by this as well
I backed up a course on 1 moodle version 1.9.5+ (Build: 20090729) and it restored with no problems on this moodle.
I then uploaded it on to a different moodle version 1.9.5+ (Build: 20090603) and when I try to restore it I get the "moodle xml not found at root level of zip file" error message.
I also tried restoring it on a third moodle version 1.9.5+ (Build: 20090617) and that restored with no problems.
I didn't think the problem is with the zip file as it has restored on 2 other moodle instances but I repackaged the zip file and the error still existed.
Does anyone have any suggestions as to why this is happening?
I then uploaded it on to a different moodle version 1.9.5+ (Build: 20090603) and when I try to restore it I get the "moodle xml not found at root level of zip file" error message.
I also tried restoring it on a third moodle version 1.9.5+ (Build: 20090617) and that restored with no problems.
I didn't think the problem is with the zip file as it has restored on 2 other moodle instances but I repackaged the zip file and the error still existed.
Does anyone have any suggestions as to why this is happening?