My Moodle 2.0 Upgrade Journey Part 2

My Moodle 2.0 Upgrade Journey Part 2

For this next part of the process I copied my Moodle 1.9 installation to a local development server. But to save time I didn’t copy the entire MoodleData folder as it’s over 160GB. I only copied the first 20 folders.
As I wouldn’t be using LDAP on this test server (yet!) I changed my admin account to a manual account so I didn’t lock myself out.

I then flushed out the htdocs folder and copied the Moodle 2.0 installation files across so that I had a clean install with no modifications and ran the install script.

Things looked good and the new progress bar moved along nicely. I hit several errors when trying to migrate the MoodleData folders I left behind as it simply could not find them, again this was intentional on my part and expected.

Then I hit my first serious error.

The installer stopped when migrating the meta courses and I was left with an ugly looking error message.

If I skipped the error and continued with the install then Moodle 2.0 would load but I was unable to use any meta course functionality.

After several days of trying various things to fix this, including submitting it to the Moodle tracker ( I finally figured out what was happening.

It turns out that I had courses listed in my meta table that no longer existed in my course table.

(For the more techie amongst us, I had entries in mdl_course_meta but the corresponding IDs in mdl_course were no longer there). For some reason, Moodle had not removed the meta course entry when we had deleted courses in the past.

And this was the cause of the error.

I used the following MySQL query to see which entries were causing this error:

SELECT fullname,, parent_course FROM mdl_course_meta
LEFT JOIN mdl_course ON = mdl_course_meta.parent_course WHERE fullname IS NULL

The query returned 30 entries which were promptly deleted.

And now the upgrade worked without any further hitches!

So now I have a fully functional Moodle 2.0 with over 25,000 live student account and over 6000 courses and approximately 3000 meta courses.

After a few initial checks to check the integrity of the data it is safe to say that the upgrade has gone as expected. Everything appears to be in the correct place, enrolments appear to have been migrated successfully and the migrated data from the MoodleData folder has worked flawlessly.

So what’s next….

In Part 3 I will further test the system and check that live database enrolments are working and test the authentication plug-ins and single sign on.

I’ll then need to do larger upgrade test with all 160GB of MoodleData- this will take an awfully long time!

Despite the slight hiccup with meta courses this upgrade has massively boosted my confidence in Moodle 2.0 and I urge all those who maybe considering an upgrade to do a test simulation as I have done.

Stay posted for the next instalment.

Previous post Book Review Moodle 2.0 First Look by Mary Cooch
Next post My Moodle 2.0 Upgrade Journey Part 3