Upgrading Moodle

Upgrading Moodle

by Douglas Funk -
Number of replies: 3

I am using this link to upgrade a 1.9.14 server to 2.2:

http://docs.moodle.org/22/en/Git

this works:

$ git clone git://git.moodle.org/moodle.git                       (1)
$ cd moodle
$ git branch -a                                                   (2)
$ git branch --track MOODLE_22_STABLE origin/MOODLE_22_STABLE      (3)
$ git checkout MOODLE_22_STABLE                                    (4)

 

When I get here:

$ cd /path/to/your/moodle/
$ git pull

I get an error: No remote repositories specified. Please, specify either a URL or a remote name from which new revisions should be fetched.

git remote -v returns nothing.

Average of ratings: -
In reply to Douglas Funk

Re: Upgrading Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Think it's called 'migrating' when moving from 1.9.14 to a 2. ;)

Do full site backup of what you have.

First step is to work with a copy of what you have ... data directory, DB and migrate that copy.   Massive changes to data directory and DB (code, as well, of course).

Take the 1.9.14 to the highest 1.9.19+ via git.

Create a new DB for the 1.9.19+ and import an sql dump from the 1.9.14 into it.

Make a copy of the data directory of the 1.9.14 to work on this first step.

Using git, get the latest code for 1.9.19+.  Change the MOODLE_22_STABLE to MOODLE_19_STABLE

Hit the copy with browser.  Go to Site Menu, Notifications if it doesn't prompt you that you are about to update.

Once you've done that, one can migrate the 1.9.19+ copy to 2.2.highest and march it through the versions - checking each time ... and running a site backup in case the next step fails for some reason.

In the git updated 1.9.19+ code directory:

git branch --track MOODLE_22_STABLE origin/MOODLE_22_STABLE
git checkout MOODLE_22_STABLE
php admin/cli/upgrade.php --non-interactive

Hit site with browser.  Login as admin level user.  Check things out.
If all OK, do a full site backup ... code, data, and DB.

Then march through the versions using the same commands as above
only changing the 22 to a 23, when 23 to 24, when 24 to 25.
Advise holding at 2.5.  When you reach 2.3 do the assignment upgrades and the quiz upgrades as well in the Moodle UI.   Then continue the march to 2.4 upwards.

Things to strategize (plan) upon ... have any 1.9.x addons that made the trip to 2?   Have any 1.9.x addons that didn't make the trip to 2.  Using a custom theme?

'spirit of sharing', Ken

 

In reply to Ken Task

Re: Upgrading Moodle

by Douglas Funk -

What does "hit the copy with browser" mean.  Does it mean what I have in .git/moodle should be where I launch the website in my case its /var/www?

In reply to Douglas Funk

Re: Upgrading Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Forgot to mention on the update to the 1.9.14 code to 1.9.19+ one uses the same (but edited for locations/db/etc.) config.php file from the 1.9.14 in the 1.9.19+ code directory.

'hit the copy with a browser' means using workstation browser and going to the copied site by URL http://where_ever_the_updated_code_resides

From what you've shared sounds like Ubuntu.   Your Apache document root is in /var/www/?  That right? (might be a good thing, next time, to share your operating system as that might change advice one gets). 

Apache shouldn't serve out any 'dot' files or 'dot' directories ... matter of fact those are supposed to be hidden from apache.   The .git directory that is created inside the apache document root is what controls git when using git from command line.

'spirit of sharing', Ken