Moodle

Migration of courses from saved zip backup will not move from 1.7 version to 1.9 on new server. One course only.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not a bug
  • Affects Version/s: 1.9
  • Fix Version/s: None
  • Component/s: Backup
  • Labels:
    None
  • Environment:
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

I have a back up of a course that has been saved on one version of moodle 1.7+ I have saved this file to my desktop and could not upload as restore file because it was too big. 64M in size. To solve this I have uploaded it to the server using FTP to the upload zip folder. I can now log into the moodel 1.9 and see the 64M zip folder.
I tried to restore over a made up course.
I changed the moodel.xml file to say my new site. eg www.mysite.com/moodle - I only changed one line. Zipped the folder again, and tried to restore it. No luck the message I received was Course restore: backup-dp101-20080413-2109.zip
Creating temporary structures
Deleting old data
Copying zip file
Unzipping backup
Checking for BlackBoard export
Checking backup
Error checking backup file. moodle.xml not found at root level of zip file.

An error has ocurred

Is there an easier way to get all my great course to my new moodle?? If not can you point me to any documentation.

I hope I did this right

john

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Hi John,

perhaps you zipped the folder containing the moodle.xml file (and others). You must create one zip file which contents are directly the moodle.xml file (and others). Without being stored in any folder.

Also, after manually changing the moodle.xml file... I'd suggest you to try to restore the course in a local (testing) site. Once verified everything is ok in test server... I'd do the restore in the production one.

Hope this helps, ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi John, perhaps you zipped the folder containing the moodle.xml file (and others). You must create one zip file which contents are directly the moodle.xml file (and others). Without being stored in any folder. Also, after manually changing the moodle.xml file... I'd suggest you to try to restore the course in a local (testing) site. Once verified everything is ok in test server... I'd do the restore in the production one. Hope this helps, ciao
Hide
john oconnor added a comment -

I have read your suggestions quite a few times.

I'm sorry but I do not understand them?

So I'll try and explain what I see on my end.

I uploaded to my server the original zipped course file.

I read the instructions about changing the moodle.xml file.
To get at that file , I had to extract the contents of the zipped course which
caused the whole folder to break into 3 folders and the moodle.xml file.
I download the Moodle.xml file to my home computer and changed the "root" to
my server's address which was no issue. I only changed one line in the
Moodle.xml file.

I them uploaded the Moodle.xml file to the same place on the server and then

Rezipped all the files into the original course folder giving it the same
name and extension

I now had one zipped folder with the right Moodle.xml file.

I then went into moodle and tried , restore, then inport etc.
It would not load. I tried a few different things with the same result of

Course restore: backup-dp101-20080413-2109.zip
Creating temporary structures
Deleting old data
Copying zip file
Unzipping backup
Checking for BlackBoard export
Checking backup
Error checking backup file. moodle.xml not found at root level of zip file.

An error has ocurred

The moodle site I'm using is not full of any courses yet. I'm moving courses
to a new moodle site so the testing or uploading on
this site is no issue.

tried several times: I can resore the file in the original moodle site just to show it wasn't corrupt.

Show
john oconnor added a comment - I have read your suggestions quite a few times. I'm sorry but I do not understand them? So I'll try and explain what I see on my end. I uploaded to my server the original zipped course file. I read the instructions about changing the moodle.xml file. To get at that file , I had to extract the contents of the zipped course which caused the whole folder to break into 3 folders and the moodle.xml file. I download the Moodle.xml file to my home computer and changed the "root" to my server's address which was no issue. I only changed one line in the Moodle.xml file. I them uploaded the Moodle.xml file to the same place on the server and then Rezipped all the files into the original course folder giving it the same name and extension I now had one zipped folder with the right Moodle.xml file. I then went into moodle and tried , restore, then inport etc. It would not load. I tried a few different things with the same result of Course restore: backup-dp101-20080413-2109.zip Creating temporary structures Deleting old data Copying zip file Unzipping backup Checking for BlackBoard export Checking backup Error checking backup file. moodle.xml not found at root level of zip file. An error has ocurred The moodle site I'm using is not full of any courses yet. I'm moving courses to a new moodle site so the testing or uploading on this site is no issue. tried several times: I can resore the file in the original moodle site just to show it wasn't corrupt.
Hide
Dan Marsden added a comment -

when you create a backup file, it must have the moodle.xml in the root of the zip.....

this means if you "open" the zip, you shouldn't see an extra folder to open before you see the moodle.xml file.

the folder structure must look like this:

moodle.zip > moodle.xml
> moddata

It must NOT look like this:

moodle.zip > moodle > moodle.xml
> moddata

if you do this in windows and "extract" the folder it will create a folder on your desktop called "backup-dp101-20080413-2109" with all the files inside.

to zip them back up using windows, don't right click on the "backup-dp101-20080413-2109" folder and tell it to "send to zip" as this will create a folder within the zip file.... go inside the "backup-dp101-20080413-2109" folder, and select all the files, and choose "send to zip" - that way, the moodle.xml file should appear in the root of the zip file.

hope that helps.

thanks,

Dan

Show
Dan Marsden added a comment - when you create a backup file, it must have the moodle.xml in the root of the zip..... this means if you "open" the zip, you shouldn't see an extra folder to open before you see the moodle.xml file. the folder structure must look like this: moodle.zip > moodle.xml > moddata It must NOT look like this: moodle.zip > moodle > moodle.xml > moddata if you do this in windows and "extract" the folder it will create a folder on your desktop called "backup-dp101-20080413-2109" with all the files inside. to zip them back up using windows, don't right click on the "backup-dp101-20080413-2109" folder and tell it to "send to zip" as this will create a folder within the zip file.... go inside the "backup-dp101-20080413-2109" folder, and select all the files, and choose "send to zip" - that way, the moodle.xml file should appear in the root of the zip file. hope that helps. thanks, Dan
Hide
john oconnor added a comment -

Dear Dan,

I've tried that about 20 times. I understand that I cannot have a folder in a folder and then zip it.
So I'll copy all the files from the server to computer desk top. and do all the rewriting the script there zip it there and then FTP it back and see what happens.

Show
john oconnor added a comment - Dear Dan, I've tried that about 20 times. I understand that I cannot have a folder in a folder and then zip it. So I'll copy all the files from the server to computer desk top. and do all the rewriting the script there zip it there and then FTP it back and see what happens.
Hide
john oconnor added a comment -

I have solved the problem and hope for others too.

The description of how to migrate a course is not clear enough .

  • When you save a back up of a course it saves it as a zip file- no problem
  • You then move that backup to your new sit and place it in the right folder - to install
  • If you then go into your moodle site and unzip it there to fix the moodle.xml file there in moodle it then creates a few problems.

Doing the zipping , chnging and restoring inside moodle creates the issue.
it actually makes a folder and inside that folder it makes two more and then the moodle.xml file
If you edit the moodle.xml file there it will not work after you zip it up. "because it creates by itself the problem of a folder in a folder"

This might seem obvious to the creator of moodel but no other unzipper software creates that extra folder.
the unzip software must be used outside of moodle

I did it the log way out side of moodle and it solved the problem-

Maybe just clearer instructions in the manual may help others but I appreciate the efforts . I've now moved my course to 1.9 and I'm using the outcomes based report and assessment procedures. They are the new light. well done.

Show
john oconnor added a comment - I have solved the problem and hope for others too. The description of how to migrate a course is not clear enough .
  • When you save a back up of a course it saves it as a zip file- no problem
  • You then move that backup to your new sit and place it in the right folder - to install
  • If you then go into your moodle site and unzip it there to fix the moodle.xml file there in moodle it then creates a few problems.
Doing the zipping , chnging and restoring inside moodle creates the issue. it actually makes a folder and inside that folder it makes two more and then the moodle.xml file If you edit the moodle.xml file there it will not work after you zip it up. "because it creates by itself the problem of a folder in a folder" This might seem obvious to the creator of moodel but no other unzipper software creates that extra folder. the unzip software must be used outside of moodle I did it the log way out side of moodle and it solved the problem- Maybe just clearer instructions in the manual may help others but I appreciate the efforts . I've now moved my course to 1.9 and I'm using the outcomes based report and assessment procedures. They are the new light. well done.
Hide
Dan Marsden added a comment -

thanks John,

feel free to add any extra documentation to the wiki pages!

Dan

Show
Dan Marsden added a comment - thanks John, feel free to add any extra documentation to the wiki pages! Dan

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: