Installation help

 
 
Picture of Paul Nijbakker
Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Hi all,

Unlike most messages in this forum, this one is to celebrate that the upgrade of our main production server from Moodle 1.9.17+ to 2.2.3+ was a success! I had been fretting about this operation for months. Our main Moodle environment has about 5000 courses, circa 10 000 users, some 250 Gb worth of moodledata and a MySql database that was set up first in Moodle 1.4 upgraded to 1.5 and 1.6 and then recreated in 1.8 and upgraded to 1.9. It was never going to be easy.

That it finally went through smoothly (even though the upgrade process took some 6 hours) is thanks to the tireless Moodlers in these forums and the Moodle developers responding to their bug reports. We ran numerous upgrade tests that revealed numerous problems (mostly database-related), for all of which we tracked down solutions in moodle.org and the Moodle Tracker.

Here is a list of the things we had to do to prepare our database for the upgrade. Perhaps some of you may find these SQL commands useful for your own upgrades:

Our test upgrades found a number of conflicts with missing or erroneous values in certain database tables that caused DDL execution errors. These were corrected in our case with the following commands:

ALTER TABLE mdl_user MODIFY COLUMN lastip VARCHAR(45) NOT NULL DEFAULT '';
ALTER TABLE mdl_post MODIFY COLUMN uniquehash VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE mdl_resource MODIFY COLUMN reference VARCHAR(255) NOT NULL DEFAULT '';
UPDATE mdl_user SET lastip = '0.0.0.0' WHERE lastip IS NULL;
UPDATE mdl_user SET city = 'unknown' WHERE city IS NULL;
ALTER TABLE mdl_modules ALTER COLUMN search SET DEFAULT 'default';

Next we ran into the timeout issue that can really mess up your server (So be sure you have a full back up (database AND moodledata folders) of you 1.9 installation before attempting the upgrade!). To deal with that we changed the timeout setting from 300 to 14 400 in the following locations:

In php.ini (in the server)

max_execution_time : 14400
max_input_time : 14400
session.gc_maxlifetime 14400
memory_limit = 2048M

In moodle/lib/file_storage/file_storage.php (in the Moodle 2.2.3 files that will run the upgrade, not in the old 1.9.17 files that were replaced, naturally)

$timeout = isset($options['timeout']) ? $options['timeout'] : 14400;

In moodle/lib/moodlelib.php (in the Moodle 2.2.3 files that will run the upgrade, not in the old 1.9.17 files that were replaced, naturally)

function upgrade_set_timeout($max_execution_time=14400) {
global $CFG;

$max_execution_time = (!empty($max_execution_time) && $max_execution_time < 14400) ? 14400 : $max_execution_time;

if (!isset($CFG->upgraderunning) or $CFG->upgraderunning < time()) { $upgraderunning = get_config(null, 'upgraderunning'); } else {

(The code highlighted in green was added into the file. These settings are temporary for the sake of the upgrade and will be undone in the next upgrade.)

What with that issue out of the way, we discovered that we had tables in our database that had different collations (Most of the tables in our case had collation utf8_general_ci while some had utf8_unicode_ci. We ran the following SQL queries to track down which tables and columns did not have utf8_general_ci as collation:

SELECT table_schema, table_name, table_collation
FROM information_schema.tables
WHERE table_schema = 'your_database'
AND table_collation != 'utf8_general_ci';

and

SELECT table_schema, table_name, column_name, collation_name
FROM information_schema.columns
WHERE table_schema = 'your_database'
AND collation_name != 'utf8_general_ci';

Instead of the green highligted string you would fill in the name of your MySql database. These comands listed the tables and columns that needed to be changed to collation utf8_general_ci. We exported them and created a list of SQL commands along the following template:

ALTER TABLE ‘tablename’ CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

In place of the green highlighted string we would have the table name of a table that contained a collation other than utf8_general_ci.

After this all tables had the same collation, excapt for the PMA tables that have always been utf8_bin. Another problem occurred when it turned out that for some new tables created during the upgrade Moodle chose another collation than utf8_general_ci. The following SQL command instructs the database to create only tables with the collation utf8_general_ci:

ALTER SCHEMA DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

That fixed the error concerning foremost the new wiki tables. After all these interventions the upgrade ran its course (although it took quite a bit longer than we had expected, so be prepared for that).

After the upgrade we expected to come accross some more errors  and we did and so far we fixed two. First of all we discovered there was a problem posting new forum messages. This was due to a missing default value in the mdl_forum_posts table. It was fixed with the follow SQL command (which can be applied before the upgrade too):

ALTER TABLE mdl_forum_posts ALTER attachment SET default 'None';

Next we found that we could not create new wiki pages (editing exiting ones worked though). This bug (The error message contains "Duplicate entry for key 'mdl_wikisubw_wikgrouse_uix") which will be fixed in the upcoming releases was overcome by editing the file mod/wiki/pagelib.php on row 949:

//if (!$this->subwiki = wiki_get_subwiki_by_group($this->wid, $groupid)) {
        //$swid = wiki_add_subwiki($PAGE->activityrecord->id, $groupid, $this->uid);
        //$this->subwiki = wiki_get_subwiki($swid);

        if (empty($this->subwiki)) {

        //If subwiki is not set then try find one and set else create one.
        if (!$this->subwiki = wiki_get_subwiki_by_group($this->wid, $groupid)) {
        $swid = wiki_add_subwiki($PAGE->activityrecord->id, $groupid, $this->uid);
        $this->subwiki = wiki_get_subwiki($swid);
        }

In which the code highligted in red (and now commented out) was replaced by the code highlighted in green.

I would like to underline that most of the SQL commands and all of the code listed above were not invented by us, but contributed by other moodlers in these forums and in the tracker and we want to say kudos to them!

Happy Midsummer from Lapland!

Rgrds,
Paul.

 
Average of ratings:Useful (13)
Picture of Paul Nijbakker
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

P.S.Perhaps needless to stress this, but apart from the database and code interventions we also undertook a number of more mundane but likewise important steps to ensure a successful upgrade:

  1. We removed as many old and inactive users as we could.
  2. We removed as many old and empty courses as we could
  3. We set the log duration temporarily to 35 days (could not be shorter due to summer courses that are running), so as to drastically reduce the size of the mdl_logs table. All three of the above measures are meant to reduce the size of the database.
  4. We deleted all 1.9 blocks, filters and activity modules that would not return in Moodle 2.2 (including the loancalc block and the old Journal module).
  5. Contributed modules/pugins that would return in 2.2 (Book and HotPot) we did not delete, but we did not include them in the initial upgrade either. We just left the database tables sit until after the upgrade and added the plugins then. All this, to avoid the risks of the contributed code causing any snags.

Finally, for those who asked about it: We run MySql 5.5.24.0.0.12.04.1 and PHP 5.3.10.1.3.2 on a Ubuntu server (latest version).

Rgrds,
Paul.

 
Average of ratings:Useful (8)
Picture of Samuel Than
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Found a php script that could change the entire tables to the correct collate



<?php

$db = mysql_connect('localhost','cpaneluser_dbuser','dbpassword');

if(!$db) echo "Cannot connect to the database - incorrect details";

mysql_select_db('cpaneluser_dbname'); $result=mysql_query('show tables');

while($tables = mysql_fetch_array($result)) {

     foreach ($tables as $key => $value) {

        mysql_query("ALTER TABLE $value COLLATE utf8_general_ci");
    }

}

echo "The collation of your database has been successfully changed!";

?>

Make sure to substitute the following in the script: 
- cpaneluser_dbname with your database name
- cpaneluser_dbuser with your mysql username
- dbpassword with your password for the mysql user
- utf8-general_ci with your needed collation if different

 
Average of ratings:Useful (2)
Picture of Paul Nijbakker
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Hello Samuel,

The php code will change table collations, but not the collation of columns inside the tables, so still something to do.

I am trying to work with a MySQL database that doggedly refuses all my SQL commands. I am at my wits end. I thought all MySql databases take the same orders...

Rgrds,
Paul.

 
Average of ratings: -
Pedro Crispim
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Acording to MySQL Reference Manual (http://dev.mysql.com/doc/refman/5.0/en/charset-table.html and http://dev.mysql.com/doc/refman/5.0/en/charset-column.html) a slight change on Samuels code will also change column collation:

<?php
    $db = mysql_connect('localhost','iccamoes_iuser','m234icamoes');

    if(!$db) echo "Cannot connect to the database - incorrect details";

    mysql_select_db('iccamoes_intramoodle'); $result=mysql_query('show tables');

    while($tables = mysql_fetch_array($result)) {

        foreach ($tables as $key => $value) {

            mysql_query("ALTER TABLE $value CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci");

        }

    }

    echo "The collation of your database has been successfully changed!";

?>

This way, all column fields will have COLLATE utf8_unicode_ci appended. I really don't know if that's necessary.

 
Average of ratings: -
...
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hi Paul! here in UPM (Spain) we had exactly the same issues than you!!

Thank you very much and congratulations on your upgrade!!


Jorge

 
Average of ratings:Useful (1)
Dan at desk in Moodle HQ, Perth
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
Hi Paul,

I'm sorry you have had to do that manual work to do the upgrade, thanks for sharing your work and findings. We should be handling these cases in Moodle automatically, and we have: MDL-34086 to investigate and resolve these issues.
 
Average of ratings:Useful (2)
Picture of Michael Woods
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hi Paul,

Thanks for posting. We had some similar issues, but not entirely the same. Certainly we had to:

  • raise the memory limits in php.ini, and
  • adjust the collation on several tables (which we did in the dumped sql file before importing into fresh database).

Regards,
Michael

 
Average of ratings: -
Ralf
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hello Paul,

thank you !!!
I used your upgrade report for upgrading my Moodle 1.9.18 system with 15.000 users, 900 courses and 120 GB of moodledata. I had exactly the same issues you had.
Your report was very helpful.  Samuel Than's database script to convert the tables also helped me a lot.

Best Regards
Ralf

 
Average of ratings: -
Picture of José Robles
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

In ITCH (Chihuahua, México) we migrated moodle 1.9.19 --> 2.2.4 , 813 courses, 6819 users, thanks Paul.

Indeed mod/wiki/pagelib.php was already fixed in Moodle 2.2.4.

Greetings.

José Robles

 
Average of ratings:Useful (1)
mine
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

With greetings of peace from Doha(Qatar).

We have also upgraded from moodle 1.9.10 to 2.2.4 (150g moodle data,21,000 users,38 courses) and ultimately to  moodle 2.3 following the reports of paul and i must mention we also needed to up the mysql wait_timeout settings to 4000 because we had mysql gone away issues.It may or may not apply to anyone else depending on the mysql server settings.

Thanks Paul smile

Salam!

 
Average of ratings:Useful (1)
Picture of Sankar Mahadevan
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hi Paul, we too had the problem same like you. I followed the guidelines which was given by you. Everything is fine except the user uploaded files are not visble in the new moodle2.2 site. In moodle1.9 user uploaded files are rendered via /file.php/7/moddata/assess/34/2/image001.png. But in moodle2.2 they have changed the file as /pluginfile.php/138/mod_data/content/3/image001.png and its not displaying. Should we need to change anything. Any guidelines would be very helpful.

Thanks,

Shankar.

 
Average of ratings: -
Picture of Paul Nijbakker
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Hi Shankar,

I am not sure I can help, but it would require some more information. Are you talking about files uploaded in assignments or another module? The filesystem in Moodle 2 is very different and indivual files will be quite hard to track down.

Did you allow Legacy course files in your site?

Rgrds,
Paul.

 
Average of ratings: -
Picture of Sankar Mahadevan
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hi, Thanks for your reply Paul.

Yes, we have developed a module called assess where user can upload answers for the given question and he can also upload a file (images or document file). In moodle 1.9 those files were stored in moodledata folder. Now we upgraded to moodle2.2, during upgradation the older files are now stored in filedir folder and those values also updated in database (mdl_files table). I'm trying to access the user uploaded older files using pluginfile.php but the files are not accessible. 

Yes, we turned on legacy files also. 

Kindly help me to resolve this problem.

 

Thanks in advance.

Shankar.

 
Average of ratings: -
Picture of Paul Nijbakker
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Hi Shankar,

I see, it is a custom module. In that case my experience does not suffice. We removed all contrib code from our 1.9 installation before upgrading to 2.2. Your developers should probably study the differences between the way, for example the assignment module stored files in 1.9 and in 2.2 and see if you can apply those to your module. It will probably not easy, but the files are there, they have not been deleted.

Rgrds,
Paul.

 
Average of ratings: -
Picture of Siddhartha Dutta
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hi Paul Nijbakker,

This is Sid from India. I've been through your post & understood what you did. But at my end the problem is a bit different. So Itried my own way. Here's what I have done & I need helpful tips from your end.

1. We've a moodle training section with courses in 1.9 version. I've not upgraded it from the upgrade option. Rather I installed a 2.2 & migrated everything except the user's table. 

2. What needs to be done for that, b'coz using the upload user's feature, it is not working at all. So is there anything that can be done from Database end? Everything else is working fine except the user table is not updated in 2.2

Also I'll be updating it to 2.3 very soon. So if you can guide me how to upload the users who're there in 1.9 version that are going to be migrated to 2.3, then I'll be really helpful to you. Scratching & searching for over a month now & wrote some DB query's too but not working.

Please reply with an amicale solution.

Take care 

Sid

 
Average of ratings: -
Picture of Nandozi Carolyn
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Rihanna and Sid,

from interacting with others on the similar method, the users may have to to register on their own again to minimise your work load or do it yourself, because its tricky...

I am interested in knowing the steps to migration from 1.9 to the upgraded 2.2 server, is it like you do it automaitcally or manually too?

kind regards,

carol

 
Average of ratings: -
Picture of Rihanna Beauty
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

I have had same problem thanks all of moodle webmasters  Webmaster forumu, domain, hosting ve sunucu tavsiyelerim

 
Average of ratings: -
me
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Could anyone help me with exactly how (what gui, etc. can I do this from a shell on my server?) to can run a SQL query? As in, where do enter the commands Paul so nicely wrote out so that I can find the tables and columns in question? I'm fairly new to this and was able to revise and change everything on his list before this but am stuck on running the SQL queries and commands. Any help much appreciated.

 
Average of ratings: -
me
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

To answer my question and potentially help another newb like myself, use phpmyadmin smile It works fairly easily

 
Average of ratings: -
Pedro Crispim
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Thank you so much for your time to share all that information with the Moodle community.

It really is being a great help - I'm upgrading now to Moodle 2.2.x+ and really hope all goes well (done all things recommended in this fórum entry).

I just want to share with all of you a tool I found wonderfull and that allows you to automatically change your production server database schema with the schema of a test server that has a brand new install of the latest 1.9 (this, of course, before the upgrade to 2.2.x+ and assuming you have also the latest 1.9 version in your production server). This tool generates a .sql file with all changes needed - you just have to run it with mysql.

The tool is 

Schema Sync

 
Average of ratings: -
Picture of John Reese
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hello all,

If you did an upgrade, did you check to see if your images showed up in your quizzes?

I reported it on a separate thread; applied the pseudo patch and even turned on the legacy file support but made no difference

http://moodle.org/mod/forum/discuss.php?d=210644

Anyone in the same boat as us?

Upgraded from 1.9.14+ to 2.2.4+

 
Average of ratings: -
Picture of Rogelio Jr. Dela Cruz
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 
as I understand it, the data base file structure of 1.9 is very different from 2.0 and up. directory structures are totally different. Re linking the images to legacy course files would be necessary
 
Average of ratings: -
Picture of jeff masiello
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

I just wanted to thankyou for this post. I am still having issues but I am going from 2.0.1 to 2.2.5. THis definatelyhelped me out though.

Thankssmile

 
Average of ratings: -
Picture of Nandozi Carolyn
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 
Thus its possible to upgrade from straight from 19. version to 2.3 version without going through the various version updgrades?
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers
No. You must upgrade to Moodle 2.2.x before you can upgrade to 2.3 or later.
 
Average of ratings: -
Picture of koen roggemans
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Translators

And I heared some people running into trouble by not upgrading to the latest 1.9 before upgrading to 2.2. 

So upgrade firtst to 1.9.19+ too.

 
Average of ratings: -
Picture of Nandozi Carolyn
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Sure, thank you all- atleast I have confirmed the version steps in upgrading-  Now we need to upgrade our current Moodle version 1.9.15 to 2.3 but actually have no clue of how to go about it or where to to start from... Your success and steps would really help us.

 
Average of ratings: -
Picture of Susan Mangan
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Ahhhhh!  I wish I had this info when I attempted my upgrade in April!! I opened up one or two tracker items with the DDL errors but nothing came of them sad

We ended up having to kybosh the uprade and we started from scratch.  Starting from scratch and restoring courses individually actually worked out pretty good for us in the end.  We had a handful of sites that had problems with the import into 2x but we got through them. 

To turn a negative into a positive we thought of it as a great exercise to clean up the server by not bringing everything over smile

 
Average of ratings:Useful (1)
Picture of Tammy Moore
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

When I read the title and the first little bit of the success story I was so glad because for a moment I felt hope. Then I read about all you had to know and do to upgrade successfully and hopes were dashed. I have been dragging my feet on moving to 2.x from 1.9. Our Moodle has been upgraded from a pre-1.9 version with lots of plugins. From all the horror stories I have heard, I feel our chances of a successful upgrade to 2.x is nill since I don't have the knowledge needed on how to work around all the database issues taht seem to be in every post related to upgrading.

It has been very discouraging mostly because we have lost confidence in being able to build and move our content forward in the future, not just in the present. If we remake our courses on a Moodle 2.x install it will not be long before we will have to do it all over again for Moodle 3.x. Our small group of volunteers just feel overwhelmed at thinking we will have to rebuild over and over again every three or so years. We need to be spending time making new courses and teaching, not remaking old courses.

Thoughts ...

I have tentaive plans at trying to put 1.9 course backups on a new server empty of student data and then upgrade that server to 2.2 and step up to a current stable release. That may mean we will not have to rebuild courses even if we have to set up accounts all over again. We have about 6000 accounts, but each family will be able to handle their own since we use e-mail confirmation for accounts. Also, many of the accounts are now inactive, so we could end up with a leaner database.

A second concern that I have is how our courses will ride on the stability of our database on 2.x. After once experiencing a failure of our site backup on an upgrade, it makes one think about worsecase scenarios. Back then, our site was small and the bad site backup wasn't too hard to recover from. We had all of our courses in course backups with userdata and that saved us even if it did take two weeks to put all the peices back together again. If the databas goes flukey in 2.x not only will we lose student data but we would even lose our courses. In 1.9 we could at least go in and FTP out our course backups in a surprise database failure and peice together a restored site.

I am trying to think in terms of future-proofing. We now have SCORM buidling tools (Captivate). Building our courses as SCORMs would mean we have an off server location for all our course data and version 3.x and beyond most likely will stay with SCORM compatibility. As SCORM standards slowly move forward we can just republish the projects from Captivate to future SCORM standards.

Another thought I had is having non-SCORM data set up in webpage format that can be linked to from the main course page. Then the bulk of non-SCORM material can also be archived off-site and pulled in should things go sour. Uploading and a bit of linking verses rebuilding a lot of course page content. It will alos allow responsive design for course content so that future screen and resoution devices can have optimized views and the new capabilities that HTML5 and CSS3 can be utilized.

I am hopeful about the talk to make upgrades as easy as commercial software. You get a notification that an update/upgrade is ready and you just click a button. Dream come true!

The key is that we can have our course data in more than just the Moodle, just in case. OK, am I being way too paranoid? It is just that we are a fully volunteer organization run by donations. We don't have the luxury of teams of server experts that can put full time attention and expertise on preparing for the worst at all times and running testing servers for each upgrade. We are just a bunch of volunteer teachers that love to teach online. Thoughts and suggestions (- words of comfort and assurance, lol)?

Are we just in over our heads? Why? We have done fine for 8 years moving forward from version to version and migrating to bigger, newer servers without too much trouble (minus the one time our site backup was corrupted when we needed to take a step back to try again - Whew! never want to go through that again). Why is this jump so different in that even the professional server admin teams from universities publicly shake in their boots? Will this be something we will see in the later big version jumps such as from 2.x to 3.x or will future version jumps be more like in the past with pretty doable upgrades by non-professional server admins?

 
Average of ratings: -
Picture of Bret Miller
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Speaking from one paranoid organization to another, there are things you can do to back up what's there:

  1. Moodle 2.3.x still has course backups and can still include user data.
  2. Make sure you have a good backup of everything.
  3. Do both.

What we decided to do is basically back up everything every night. Our Moodle is hosted offsite on Debian/MySQL. Internally, we are a Windows shop, so we have dislike systems involved. Here are the steps we take:

  1. Schedule a nightly cron job to dump the Moodle database.
  2. Schedule a nightly rsync job on-site to sync the database, Moodle public html files, and Moodle data files. Since we use rsync (the cygwin version), only changes are synchronized making the time it takes nightly bearable.
  3. (Optional) Zip the database, html files and data together into a large archive snapshot.
  4. Back up what you've synchronized using whatever you normally do for internal backup.

This way, you should basically be able to restore everything to the way it was on any particular day for as far back as you keep your backup sets. You should periodically test this by restoring a complete backup to a test location (see Moodle Migration for details). We do this three times per year in between terms. It's work, but that's how you insure you CAN restore in the event of a real disaster.

This should work regardless of whether you run Moodle 1.9, 2.3 or 2.4. 

As far as the upgrade issues, as with any CMS, plugins can always be the sticking point. About the only advice I have is to try to pick ones that seem to keep up.

 
Average of ratings:Useful (1)
Picture of Rick Jerz
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Would you be willing to share your rsync commands with us?  I want to explore this command and need some help.  Anything that you can provide would be appreciated.

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers
Hi Rick

I don't know how far you've explored rsync. This is the starting point.

$ rsync [OPTIONS] SOURCE DESTINATION

- SOURCE and DESTINATION have the syntax [[USER]@SERVER:]PATH
examples:
* path/to/subdir is a relative path to a subdirectory in the same machine
* /path/to/dir is a full path to a directory in the same machine
* IP-Addr:path or FQDN:PATH point to PATH in another machine, if the userids are the same
* add user@... if the remote user is different

- OPTIONS are as usual numerous. Here are two common ones
* -av all the files, also recurse into directories
* --delete if a file only exist in the destination, delete it.

"man rsync" for more. Here's the homepage of the developers http://rsync.samba.org/. The original co-developer Andrew Tridgell is a stalwart in the OSS scene.
 
Average of ratings: -
Picture of Rick Jerz
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Thanks much.  This is a very good start.

Yes, I have "man'd" rsync, but became overwhelmed (as usual with UNIX) with all of the options.

But I really want to work with rsync and master it, so your post gives me some encouragement.

Here is what I really want to do (you will probably love this).  I really want to backup my moodle files to a cheap hosted server that is providing unlimited storage (so they say).  I do not know if this will be possible, but in my way of thinking, I want to move my moodle backup files to another server.  If I could find a way to move them to my PC, I would do that.  So I am exploring ways to do this too, and I have learned that I can FTP from a command prompt.  Any thoughts about what I am really trying to do would be appreciated.

 

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Offsite backup with rsync, ...
Group Particularly helpful Moodlers
Hi Rick

Sure, rsync & Co. are in productive use in my place since a long time!

For your project, you can combine the ideas in these two sources:
- http://rsync.samba.org/examples.html
- https://moodle.org/mod/forum/discuss.php?d=201622
 
Average of ratings: -
Picture of Bret Miller
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Absolutely. This requires some setup as ssh normally requires a password, but you can set it up so that one is not required. Google "ssh with no password" or http://www.linuxproblem.org/art_9.html for instructions on how to do that.

Then you'll need 3 rsync's

rsync -e ssh -z --stats -i -t --partial --partial-dir=Xfer/ -r --delete --timeout=30 username@servername:/path-to-moodle-public-html/ moodle-html/

rsync -e ssh -z --stats -i -t --partial --partial-dir=Xfer/ -r --delete --timeout=30 username@servername:/path-to-moodle-data/ moodle-data/

rsync -e ssh -z --stats -i -t --partial --partial-dir=Xfer/ -r --delete --timeout=30 username@servername:/path-to-moodle-database-backup/ moodle-db/

If your connection isn't reliable, you need a loop to check stderr and retry until you get it all.

 
Average of ratings: -
Picture of Rick Jerz
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Thanks much.  I am going to be giving this a try soon.

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers
Hi Tammy

I too was perplexed as these failure stories started appearing as big SUCCESS. Now I think it must be an esoteric trick, a spell, to influence one's destiny. Why don't you join in?
smile
 
Average of ratings: -
Just wondering . . .
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
Group Particularly helpful Moodlers

Tammy, some random thoughts, have you considered this as an option:

  1. Create new 2.4
  2. Backup and restore courses from your old Moodle

Here it gets a bit tricky:

Plugins.  Whatever way you upgrade/migrate, yoou'll probably have plugin problems.  It all depends.  We have been caught by loss of functionality in 1.9 > 2.4, and in other ways, helped by it.  Also, some plugins we had in 1.9 have been replaced by built in capacities.  It's the 1.9 plugins you see as indispensible and are NOT ready for 2.4 where you will have the problem.  SO: make sure you can specify exactly what you want and you may be able to get it in another way.  Maybe.

Shifting members.  In one site I did this:

  1. E-mailed members in the old Moodle saying who needs to shift over, and I created accounts with a spreadsheet.  
  2. Latecomers just created their own accounts manually.

I found a LOT of spam accounts.

How you go partly depends on

  • the number and complexity of the courses
  • the dependency you have on the plugins, and a LOT of plugins have gone west in the shift from 1.9 > 2.0
  • if you can do this in slow motion?  Run 2 sites for a while?

On the other hand, to be reassuring: I do not believe we will ever have a fraught upgrade like the 1.9.x > 2.x again.  Also the plugin future is likely to be better, with upgrade from the admin interface coming.

The question: which of the possible hard and difficult routes to take.  The advantage of the backup/restore is a cleaner leaner database.  Probably.

and also: this is a belief statement - Moodle 2.4 is better in it's scorm handling.  You may like it.  No you are not being too paranoid.

Good luck.

-Derek

 
Average of ratings: -
Picture of Visvanath Ratnaweera
[rant] Upgrade Moodle 1.9.17 to 2.2.3 (believe in) SUCCESS!
Group Particularly helpful Moodlers
Hi Derek

> On the other hand, to be reassuring: I do not believe we will ever have a fraught upgrade like the 1.9.x > 2.x again.

Yes, one has to believe in something. If nothing else, believe at least in Murphy.
sad
 
Average of ratings: -
Marc Couture
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

We are in the process of testing the upgrade from 1.9.18+ to 2.2, and from there to 2.4.x.

We did attempt backing up individual course sites and restoring them to a fresh 2.4.1+ installation, but without user data included in those backups, this is quite useless for our teachers (for example, those who want to keep their forums with all threads and messages intact).

Our first server upgrade test on a copy of our production server took over 50 hours of processing time... and most of the resources and activities don't work properly on the new install.  Not good.

Our installation is quite large: we have over 7500 course sites, our moodledata folder is approximately 1.2TB in size, and we have over 78 000 user accounts to move over to 2.4... and I'm not sure how large our database is at this point.  We're still at the testing phase but will most likely go through many of the suggestions made in this thread to clean up our server before we proceed. 

Thanks to all who have contributed so far, much appreciated!

 
Average of ratings: -
Picture of JF J
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

For those following Paul solution, you should use the CLI instead of messing around with the timeouts.

 
Average of ratings: -
Picture of shrikant gakhare
Re: Upgrade Moodle 1.9.17 to 2.2.3 SUCCESS!
 

Hi Paul,

Please have a look at the forum post https://moodle.org/mod/forum/discuss.php?d=252213.

Need your help.

Thanks

Shrikant

 

 
Average of ratings: -