Upgrading from 2.6 to 2.8

Upgrading from 2.6 to 2.8

by Mike Clarke -
Number of replies: 5

I want to upgrade my course from 2.6 to 2.8. I have never done an upgrade before so I have some details of the process which I am unclear on.


Below is an outline of instructions. One the first line it says 'move your old Moodle software program files'....what are these software program files and where are they located?

screen shot

Below shows my config.php information:



$CFG->dbtype    = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'localhost';

$CFG->dbname    = 'fungaled_mood609';

$CFG->dbuser    = 'fungaled_mood609';

$CFG->dbpass    = 'S3940e-.P7';

$CFG->prefix    = 'mdl_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbport' => '',

  'dbsocket' => '',

);


$CFG->wwwroot   = 'http://www.fungaleducation.net/moodle';

$CFG->dataroot  = '/home/fungale0d/moodledata';

$CFG->admin     = 'admin';



From this I cannot see where my content is stored. When going into 'moodledata' I cannot see any content that I have inputted on my site.

Average of ratings: -
In reply to Mike Clarke

Re: Upgrading from 2.6 to 2.8

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Your program software is the "moodle" folder.  Just copy the whole folder to a "moodleold" folder.  Then, from within that folder, copy over any plugins/themes/etc and your config.php to the new moodle folder that you downloaded from the moodle.org site.

You do not need to copy your moodledata folder unless you are moving to a new server.  It is where all your files are stored though it is hard to find the actual files (they are hidden pretty well);

You should backup your database before the upgrade just in case.

Once you have moved the new Moodle folder into place, make sure that you change ownership and permission on the folder so that apache user can read/write to it.

In reply to Emma Richardson

Re: Upgrading from 2.6 to 2.8

by Alkiviadis Giannakoulias -

I have also tried to upgrade from 2.6 to 2.8 without success. My main problem was the database, since 2.6 and 2.8 seem that they don't have the same tables/rows. I have used phpMyAdmin to do the db backup but when I tried to load the contents I could not! It was failing in some tables.

Is there a description on how to do the database backup and recovery process?

Kind Regards

-Alkiviadis

In reply to Alkiviadis Giannakoulias

Re: Upgrading from 2.6 to 2.8

by Mike Clarke -

I used filezilla but I presume the layout of both are similar.


Before attempting the upgrade you should have saved the entire moodle folder that is found in public_html. Label it 'moodleold'. I also saved the folder 'moodledata' too, as this has content in. I also saved a copy off the server (on my pc disk).


You should also save the config.php file.


In your Moodle, you should use the backup option on a regular basis. However, I found difficulties with any restoration of old files when performing an upgrade. When you continue with the upgrade (see below), your Moodle should ask if you want to upgrade your database. By doing this, you cannot go back to a previous version as the code (the 2.6 files) are older than the database (now 2.8).


After downloading and unzipping the new 2.8 folder, move this from you computer to the server, making sure you put it in 'public_html'. Once this is done, you should now see your new moodle folder and have 'moodleold' below it (it does not matter you have both because they are named differently). Then move the config.php file that you have saved from the old folder into this new folder.


As mentioned above, you can then go to your Moodle and choose to upgrade.


If your upgrade has not worked the first time, there might be files missing. If the method of upload has not listed these files and/or does not give you the option to try uploading them again, I found I had to delete the 2.8 Moodle that was just uploaded and try again.


Have I answered your question?

In reply to Alkiviadis Giannakoulias

Re: Upgrading from 2.6 to 2.8

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Your database backup is for emergency recovery if the upgrade fails and you have to revert to 2.6 again and re-create your original site (you should also have a backup of your moodledata and code folders for the same purpose). However the upgrade process itself changes your database to match the requirements of the 2.8 installation but without destroying any of the previous contents, so there is no need to then restore the previous backup if everything has worked properly - in fact you can't (as you have discovered).

Make all your backups - then upgrade the code folder as required and run the upgrade (from the administrator notification page) and hopefully you wont need to make any use of the backups you took! (but make them anyway!!!)