Upgrading old moodle on old server

Upgrading old moodle on old server

Aurélie Merckx發表於
Number of replies: 9

Hi everyone,

I've inherited an old Moodle website, which has been running well so far but hasn't been maintained much.
It's using Moodle 3.8 running on Ubuntu 18.04.4.
PHP version is 7.1.33-15 and MySQL version is 5.7.30-0.

I understood that the best (less risky) option would be to migrate to a new server running a fresh and up to date distribution of Ubuntu. However I have questions:
- is it correct that it's easier and less risky to change servers rather than do a release-upgrade?
- which version of Ubuntu would be recommended: 22.04 Jammy Jellyfish or 24.04 Noble Numbat ?
- the PHP and MySQL versions will be different. Should I upgrade Moodle before migrating servers or after? Does it have an impact?

Many thanks in advance for your help and support!

評比平均分數: -
In reply to Aurélie Merckx

Re: Upgrading old moodle on old server

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
You have lot of freedom in choosing all that. And this time it'll be easier than the first time, Upgrading an old version of Moodle.
眨眼

I've documented the hard facts in a chart: http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases. (Pay attention to the maximum compatible versions of system software.)

評比平均分數:Useful (1)
In reply to Aurélie Merckx

Re: Upgrading old moodle on old server

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
In case you don't read any further... make sure you take full backups of Moodle before you touch anything.

I would strongly recommend migrating to a new server. Release-upgrade will almost certainly work in that it'll upgrade Ubuntu. The most likely outcome, however, is that it will trash your database. Not the end of the world (if you have a backup) but a hassle.

I just like the idea of knowing that I have a completely clean server and then re-installing my Moodle data. If we're talking Ubuntu Server then always go with the LTS. I think that's currently 22.04
 
BUT... you also need to consider what Visvanath is saying above ^^
In reply to Howard Miller

Re: Upgrading old moodle on old server

Jon Witts發表於
Plugin developers的相片 Testers的相片
Ubuntu 24.04 is the latest LTS release - I never install a production server until it is at least on the .1 release... It will probably be at some point this summer that Ubuntu 24.04.1 is available

Jon
評比平均分數:Useful (1)
In reply to Aurélie Merckx

Re: Upgrading old moodle on old server

Ken Task發表於
Particularly helpful Moodlers的相片

In addition to Mr. V's and Howard's advice ... both semi repeated here ...

Lot's of planning ahead.
Highest version of 3.8 is 3.8.9 (Build: 20210510)

If you plan to march the site upwards, first order of business is to do a full
site backup and store on server.  That's code + DB dump + minimally moodledata/filedir/

Before doing anything with the site, set the theme to boost via config.php file
and leave it like that for the duration of the march.
$CFG->theme='boost';
You can worry about how site looks after arriving at destination version .. for the march concentrate on function ... not form.

Get the 3.8 site under git versioning ... side load or upload ... and get to the 3.8 to highest.
One reason for doing that ... scripts in admin/cli/ .. one of which is uninstall_plugins.php
which will help you ID additional plugins installed in the current site.

Git makes marching much easier ... just for core moodle.

I'd also highly recommend the installation of moosh - command line utility for Moodle.
A version compatible with version of 3.8.
https://moodle.org/plugins/pluginversions.php?id=522
0.39 (2021032400)

Note: you will have to upgrade moosh as well.

Plan the march checking Mr. V's chart and Moodle releases IO
https://moodledev.io/general/releases
making note of required PHP version, MySQL/MariaDB version + php extensions.
You can't get those higher than what is supported moodle version wise.

Now some questions:
How are you hosted?   
Does hosting offer attached data devices that you can detach and re-attach to another server?
How are users currently authenticated?
Does site make use of any external resources that would require re-config at the other end?

There is an alternative to a site march.  Individual full course backups.
XFer those to a file system repo on new server.  Restore using moosh or scripts in admin/cli/

Catch 22 for that approach - add-on plugins in current site .. do they exist in destination version?

Lot's of planning and fun and games ahead! 微笑

Hope your 'customer' doesn't expect this to happen in a short time frame!

'SoS', Ken

In reply to Ken Task

Re: Upgrading old moodle on old server

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
I would add that if the site matters at all... I would get a working copy and do a test run somewhere where it doesn't matter if/when it goes wrong.
評比平均分數:Useful (1)
In reply to Ken Task

Re: Upgrading old moodle on old server

Ken Task發表於
Particularly helpful Moodlers的相片

Follow up to own posting just to keep it together ... just thought of one additional - worth doing now.

Install MySQLTuner - a .pl script - run with superuser creds of DB server.

You might find there are tables in need of optimizing and other tweaks you could do now to make your DB best it can be ... knowing that when finally having to upgrade MySQL ... at least the DB for moodle is as good as it can be.

And ... DB character set and collation ... InnoDB, utf8mb4 character set with utf8mb4_unicode_ci collation - matches what is in config.php of site.

There are a couple of cli only scripts in code/admin/cli/ that will check and fix - if need of fixing, fix them now .. before you begin.

On new server make sure tuner is also installed - run it there as well  After every hop moodle version wise.

Last 2 cents worth!

'SoS', Ken

In reply to Aurélie Merckx

Re: Upgrading old moodle on old server

Rick Jerz發表於
Particularly helpful Moodlers的相片 Testers的相片
I believe that you have already asked this kind of question. See Upgrading an old version of Moodle.