Moodle CommandLine upgrade

Moodle CommandLine upgrade

by Ernie Havermale -
Number of replies: 1

Hello,

I am attempting to upgrade Moodle from 2.6 for 3.2. I know this requires that I jump to 2.7 first and then 3.2. I am attempting to use the admin/cli/upgrade.php command to complete this process, due to the size of the database the web side takes to long to complete. 

I need to be able to pass this script a parameter for the directory and database to update. Normally the script will just run under moodle and moodledata but my current set up has multiple instances of moodle running ie COMPAAAmoodle/COMPAAAmoodledata or COMPBBBmoodle/COMPBBBmoodledata.

This is to allow each company to be able to upgrade without interfering with another companies version. So I need to pass upgrade.php COMPAAA or COMPBBB and have it run. 

From looking at the upgrade.php logic it seems like they is code against passing unrecognized parameters. 

Has anyone ever tried this before?

Average of ratings: -
In reply to Ernie Havermale

Re: Moodle CommandLine upgrade

by Moodle Admin -

In the firstline of the upgrade.php file there is the following require statement.

require(__DIR__.'/../../config.php');

So this will only upgrade the moodle which the upgrade.php file is called.

So you don't have to specify a directory parameter.