Help with a big Upgrade

Help with a big Upgrade

by Rob Duncan -
Number of replies: 5

Hi All,

I have just taken over administration of a Moodle site and the first order of business is a great big upgrade. If I could get your feedback and advice on how to procede with the following install:

Moodle version 1.5.1

MySQL version 4.1.10a

PHP Version 4.3.9

Apache API version 20020903

Both on seperate Red Hat blades (Enterprise AS v4)

My concern is MySQL, I have never upgraded one, I am wondering about the character set, moving from latin1 to the utf-8 character set. As far as I am aware all of the characters currently in the DB are latin1, but I know MySQL will allow non-Latin1 characters to be entered. Any info on how to check my data and then do the upgrade itself would be great- I think the MySQL website is somebodys nightmare and the less time I have to spend looking at that the better

What way should I do the Moodle upgrade, -that is, should I increment the upgrade or just go straight from 1.5.1 to the latest version- is this advisable?

Any help is greatly appriciated.

Thanks

 

Average of ratings: -
In reply to Rob Duncan

Re: Help with a big Upgrade

by Rob Duncan -

No one replied- ohhhh the humanity....

Can anyone advise on just the Moodle part then.. from 1.5.1 to 1.6.*

Should I increment the upgrade or just install the latest over 1.5.1.

Thanks,

In reply to Rob Duncan

Re: Help with a big Upgrade

by Randy Obert -

http://docs.moodle.org/en/Upgrading_to_Moodle_1.6 

From what I read, no issues but they do suggest a test install.  There are in fact db changes and that is where the trouble lies.

MAKE SURE you have a good backup of the database and user files 

My personal approach to mulitple version upgrades is to go 1 at a time.  Jumping over versions typically is a good way to end up in trouble when dealing with db type programs.

The MYSQL you are running is a bit behind and 4.1.21 I think is current stable for ver 4

In reply to Rob Duncan

Re: Help with a big Upgrade

by Timothy Takemoto -

I am not sure about the upgrade of mysql. I was using a latin DB too but I did not use the migration script which *should* be able to convert the contents of your database to UTF-8
http://docs.moodle.org/en/Database_migration
But as Randy says your mYsql version is low...you will need "requires MySQL 4.1.16 (4.1.12 if you use latin languages only). "

Personally, I dont think that there is any need to increment the upgrade and it is a pretty standard one to make (if you were going from 1.1, 1.2 or even 1.4 then there might be slightly more reason to worry) but take a database backup and make course backups too.

Tim

In reply to Timothy Takemoto

The MIGRATION script is amazing!

by Timothy Takemoto -

I am thrilled by the effectiveness of the migration script that just succeeded in updating my latin encoded UTF-8 content database into a UTF-8 database.

The migration script succeeded where even editing by hand, editing backup files by hand, conversion utilities (jconv, kanjiconverter - which are good in their way) and text editors failed. I tried to use regex to remove the garbled Japanese but some of the characters were so weird that they could not be copied or recognised by the search, or copy.

I have had so much trouble with moving between EUC-JP to (alas latin encoded due to the age of MySQL) UTF-8, and bearing in mind the old site does not have a 4.1.9 or above database, I was not even going to bother trying to upgrade my 1.5.x site.

But just now (encouraged by Frank)
1) I downloaded my 1.6.2 moodle files over the top of the 1.5.x in my PC
2) I downloaded MySQL 4.1.21 "Windows (x86)" unzipped and ran the "Custom" setup.exe, pointing the installer to easyphp/mysql (see attached screen shot)
3) Ran the upgrade and migration script and....wah..it worked.

Whoever did this is a genius. I thought I would have to spend all day and night recreating my courses this term. It looks like I am just going to be able backup, restore and import. Fingers crossed.

Thanks very much!

Tim

Attachment custom.jpg
In reply to Timothy Takemoto

Re: The MIGRATION script is amazing!

by Timothy Takemoto -

The migration script when really well when I was upgrading a Latin encode database, UTF-8 contents site. At fist I had problems with my old EUC-JP contents in the form of backed up course files from 2 and a half years ago. I restored these contents into 1.5.2 moodles and tried upgrading.  

When the site language is set to EUC-JP the screen (displayed in UTF-8) is of course so garbled I don't know what is going on. I don't think the database migration script is displayed.

When the site language is set to en the option to migrate the database is not offered.

I eventually found the the migration script at
../moodle/admin/utfdbmigrate.php
But when I go there it tells me that "the migration has already been performed". However, in the file utfdbmigrate there is a line

    if (!empty($CFG->unicodedb)) {
        error ('unicode db migration has already been performed!');
    }

So I added
$CFG->unicodedb = "";

To the (moodle created) config.php (which not specification). And presto! But alas, this time the migration did not work (...) at first. Now it does. The reason...

I tried a variety of database formats.

I tried the old EUC-JP contents on a EUC-JP database but the contents would not display.

I tried the  old EUC-JP contents on a new moodle with UTF-8 database and everything displayed fine. But when I uploaded that it would not offer me the migration option and when forced the migration using the above technique, the migration did not work.

I tried Latin1 (western languages) and the EUC-JP database contents displayed fine (with the site on EUC-JP). Upgrading worked fine and the migration script, called automatically, migrated fine.

The moral of this story....
Do not create a new UTF-8 database prior to the migration or moodle will think you have migrated already!
Use the same database encode as was originally used to create the contents, bearing in mind that this may be DIFFERENT, from the encoding of the contents!
Now I have two textbooks worth of quizzes, and literally hundreds of suffering students. Tomorrow the world...smile

Tim