Data migration from 2.5.6 to 3.0.9

Data migration from 2.5.6 to 3.0.9

by Roman Cylwa -
Number of replies: 10

Hello, Moodle teams!!

I have a MS SQL database with Moodle data from version 2.5.6. I can access this from Moodle 3.0.9 with some success (there are small but many widespread errors throughout Moodle) but I would much rather prefer this data to be stored within a more modern database. I've then created a second database on the same server via Moodle 3.0.9 installation successfully and it has all of the necessary tables suitable for 3.0.9 interactivity but it is not populated.

I have tried using the import/export tool via SQL Server Management Studio but it does not transfer this data, possibly due to a mismatch between the table schema of these two databases.

My question is - how can I get this data migrated such that it will be feasible to implement in this second database that will be operable with the presently installed Moodle? I have consulted the forums and upgrade docs on this website and yet I'm still at a loss here.


Any help is appreciated. Thank you in advance.

 

Average of ratings: -
In reply to Roman Cylwa

Re: Data migration from 2.5.6 to 3.0.9

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

Moodle will upgrade the database as necessary when upgrading the code.  However, you need to go to 2.7 first and then on to 3.0.  Just go through the regular upgrade process.

In reply to Emma Richardson

Re: Data migration from 2.5.6 to 3.0.9

by Roman Cylwa -

Hi,


Thank you for your response. I have downloaded v.2.7.19 and begun the standard installation but I get to this error screen upon entering my database credentials. Pressing the 'Continue' button on this screen does nothing.



In reply to Roman Cylwa

Re: Data migration from 2.5.6 to 3.0.9

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Just what it says I'm afraid. 

You've made a mistake and installed Moodle code that is older than the code that created the database. 

In reply to Howard Miller

Re: Data migration from 2.5.6 to 3.0.9

by Roman Cylwa -

If that is the case then how can I check which version installed this DB and then proceed to upgrade from whatever necessary version of Moodle?


Thanks.

In reply to Roman Cylwa

Re: Data migration from 2.5.6 to 3.0.9

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

As long as you have access to the database... find the table 'mdl_config' and locate the record where name='version'.  What is the corresponding value?

(You can look up the Moodle version from that value which is the 'build number' here - https://docs.moodle.org/dev/Releases)

In reply to Howard Miller

Re: Data migration from 2.5.6 to 3.0.9

by Roman Cylwa -

Thank you for the clarification.

I see the version no. as 2016120502.02 which references a previous attempted installation of Moodle v.3.2.2+ that was ultimately problematic. I then compared the table schema between this existing version and that of another database on the same server that I had selected for v.3.0.9 and there were several differences. While this secondary database worked fine with the v.3.0.9 installation I could not populate it with the data I need in the primary database.

Please advise on how I can proceed from here?

Thanks in advance.

In reply to Roman Cylwa

Re: Data migration from 2.5.6 to 3.0.9

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well... evidence suggests that your database is from a 3.2.2 installation. 

I hope you have a backup of the 2.5.6 version. 

In reply to Howard Miller

Re: Data migration from 2.5.6 to 3.0.9

by Roman Cylwa -

Hello again,

I've followed these instructions after the DBA provided a backup onto the test server and it was successful. Thank you to everyone for all of your help!!

In reply to Roman Cylwa

Re: Data migration from 2.5.6 to 3.0.9

by Roman Cylwa -

Hello again,


I've also tried installation via versions: 2.7.19, 2.8.12, and 2.9.9+ and I'm still getting this strange error.

Which version should I install prior to installing 3.0.9 or 3.2.2+?

In reply to Roman Cylwa

Re: Data migration from 2.5.6 to 3.0.9

by sandeep baghel -

Hello Roman,


I will recommend following the standard process for upgrading.

Moodle is launching new versions frequently and accordingly database architecture is getting changed with major releases. So, directly configuring the old database with new Moodle codes will not work.


Standard process for upgrading moodle version to 2.7 is :- https://docs.moodle.org/27/en/Upgrading


once done, you can upgrade the version to 3.2.2 :- https://docs.moodle.org/32/en/Upgrading

Prefer to do the upgrade is development environment. smile

Regards,
Sandeep Baghel

Average of ratings: Useful (1)