Moodle 3.9.x, do I need to do the full upgrade process for new weeklies or point releases?

Moodle 3.9.x, do I need to do the full upgrade process for new weeklies or point releases?

by Thomas Wootten -
Number of replies: 4

Do I need to do the full upgrade process for new weeklies or point releases, as documented here:

https://docs.moodle.org/39/en/Upgrading

Ie putting the site in maintenance mode, removing the old /var/www/moodle and unzipping the new, manually copying config.php and all the additional plugins over.

Or is there a more streamlined way to do weeklies/points that involves less or no downtime?

Average of ratings: -
In reply to Thomas Wootten

Re: Moodle 3.9.x, do I need to do the full upgrade process for new weeklies or point releases?

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

The process will depend on how you obtained the Moodle source code: using Git or extracted from a Zip file. What I would do:

  1. Put the site in maintenance mode and log out.
  2. Take a database backup. It doesn't take long and it's an easy way to roll back.
  3. Update the source code to the weekly or point release:
    1. If you used Git run git pull.
    2. If using a Zip file copy the new files into the source code folder.
  4. Log into the site as an administrator and you should be prompted to install the update.
  5. Take the site out of maintenance mode.

Once you're familiar with the process you'll hopefully find it's straightforward and fairly quick. However for the first time if you take a full backup – database, Moodledata folder and source code folder – then if anything goes wrong you have a safety net. Or you could make a copy of the site, e.g. on a VM, and perform the above steps on this copy to test the process before repeating the steps on the live site.

Average of ratings: Useful (1)
In reply to Thomas Wootten

Re: Moodle 3.9.x, do I need to do the full upgrade process for new weeklies or point releases?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
There are many ways to upgrade your moodle, and Leon points out several. A while ago, I made a couple videos that illustrate a few ways. Perhaps these will help you, or give you some guidance as you develop your own way.

See https://moodle.org/mod/forum/discuss.php?d=401983#p1621924.
Average of ratings: Useful (1)
In reply to Thomas Wootten

Re: Moodle 3.9.x, do I need to do the full upgrade process for new weeklies or point releases?

by Ken Task -
Picture of Particularly helpful Moodlers

If your site was installed with git or if you can 'side load' the moodle git repo to current code directory, by far, git is the most efficient/easiest/less prone to human error/forgetfullness, etc.

Literally a matter of minutes for git to acquire new files, erase files no longer needed, and change files that need changing.

See:
https://docs.moodle.org/310/en/Git_for_Administrators

On small shell script (18 lines to be exact) could backup code/db and minimal moodledata/filedir, run cron, put site in maintenance mode, acquire the point release code, upgrade the DB, purge the caches, take site out of maintenance mode ... ready for use/testing via web browser.

Well worth exploring in a clone of what you have for production prior to side loading your production site.

'SoS', Ken


Average of ratings: Useful (1)
In reply to Thomas Wootten

Re: Moodle 3.9.x, do I need to do the full upgrade process for new weeklies or point releases?

by Thomas Wootten -
Thanks for the advice everyone. Git looks very promising. I'll follow up with what I go with.