Upgrade from 1.9 to 2.0+ need to find zip folder on Server

Re: Upgrade from 1.9 to 2.0+ need to find zip folder on Server

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

Glad to help.  On a more technical note:

First attempt at restoring the 1.9.8 rather large backup (83+ Meg) resulted in very quick reponse (error) saying 'Could not write to database' and then yet another db error on same screen - 'could not read'.  Neither really described what the error was.

Inserting the 'debugging' lines from the config-dist.php file into the config.php file and attempting again, one could see the actual error:

'server has gone away ...'.  In checking MySQL forums/Google ... it was an indication that max_allowed_packet was set to low - default is 16M.

adding:

max_allowed_packet=500M

to /etc/my.cnf (Linux server MySQL) and restarting the mysqld service the restore process did complete.  The value was a guess for this non-certified MySQLDB administrator ... but anything larger than 16M (yes, I know not very scientific).  It may have worked with 32M, but I've found that setting more than one needs initially might cover the next large course/etc.  Of course, that means one could set to high as well.  Tweaking settings seems to be the order of the day when dealing with 2.x.  Other added to my.cnf:

open_files_limit=6000

It is also highly recommended to run some kind of MySQLTuner for other tweaks.

PHP settings were also tweaked (previously):  max memory a script can consume, max amount of time for script to run, etc..

This offered in hopes it helps someone else (non-certified MySQLDB admin) attempting to restore large 1.9.x courses to 2.4 Moodle.

'spirit of sharing', Ken