Restoring database from old Moodle installation

Restoring database from old Moodle installation

by School Admin -
Number of replies: 4

I'm an IT guy at a small high school on a small Pacific Island with around 700 ~ 800 enrolled students. I came in to pick up the pieces after the previous IT guy left without giving the usual notice. Anyway, I would appreciate very much any help you can give me.

I'm trying to restore data from an old Moodle installation to a Moodle install running on a Synology NAS. I have the moodle.sql file and a moodledata folder. Do I copy the moodledata contents to my current moodlefolder and use phpMyAdmin to import the moodle.sql file?  

Thanks for your help.


Average of ratings: -
In reply to School Admin

Re: Restoring database from old Moodle installation

by Ambrish Tiwari -

Hello,

To restore the database form old Moodle installation kindly perform the below steps.

1) Take the backup of moodledata folder.

2) Take backup of the moodle database i.e. .sql file.

3) Place the replace the new moodledata folder with the old moodledata folder.

4) Import the .sql file to the new database.

The above procedure will work fine if the old Moodle version and the new Moodle version are same.

if the old Moodle version is less than 2.9 and the new Moodle setup is 3.x.

It would be great if you can provide more info on the Moodle version you are using.

 

In reply to School Admin

Re: Restoring database from old Moodle installation

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

The moodledata folder is different to the moodle folder.  Make sure that you don't confuse the two. 

You will also need to update the config.php file to reflect the old database and database user and the location of the moodledata folder.

In reply to Emma Richardson

Re: Restoring database from old Moodle installation

by School Admin -

Thanks for the replies. So this is what I did, I've copied both moodledata and moodle.sql folder and file to the Moodle Data which is in config.php file. Is this correct? 


Thanks for your help.

In reply to School Admin

Re: Restoring database from old Moodle installation

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I am very confused by your statement here.  Please be more specific.  Have you looked at the documentation on migration?