Upgrading Moodle via migration to TKL?

Upgrading Moodle via migration to TKL?

by Andrew Leer -
Number of replies: 8

I'm attempting to upgrade from Moodle 2.5 to 2.9, while migrating my server to a TurnKey Linux appliance.  (no plugins)

Do I need to upgrade first? 

Since TurnKey already has Moodle 2.9 setup, is there any way to just copy over the moodle data directory, and restore a dump of the existing sql database; and then have Moodle 2.9 detect that an upgrade is required?

If this is not possible I suppose my options are limited to:

  • Upgrading the existing site to the same version and then restoring the backup to the site.
  • Recreating the existing cohorts, on the new server.
  • Exporting the existing courses and importing them again...
  • Exporting the existing users (purging old ones) and re-importing them again.


Please let me know if I missed anything.

Thank you,

   Andrew J. Leer

Average of ratings: -
In reply to Andrew Leer

Re: Upgrading Moodle via migration to TKL?

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

You can do this but it is not really recommended. 

It is much better to upgrade your installation either before the move or after.  That way if you have issues, you know which part you are having issues with.  To do it all at once, while timesaving if it works, will be much harder to troubleshoot if it does not go smoothly.

If you do decide to go this way (actually either way), make sure that you copy over your config.php file and any existing plugins before upgrading.

In reply to Andrew Leer

Re: Upgrading Moodle via migration to TKL?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You asked:
> already has Moodle 2.9 setup, is there any way to just copy over the moodle data directory, and restore a dump of the existing sql database; and then have Moodle 2.9 detect that an upgrade is required?

I am pretty sure, I have done that, for minor updates, at least. I expect it to work from 2.5 to 2.9. Why don't you try?
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Upgrading Moodle via migration to TKL?

by Andrew Leer -
Okay I tied upgrading on the new server, and I fixed an issue with tables not being Baracuda by running the sql commands manually (the cli didn't work for some reason)

so after running the same command with the --show-sql arg I ran this:


USE moodle1;
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_file_format=Barracuda;
ALTER TABLE mdl_data ROW_FORMAT=Compressed;
ALTER TABLE mdl_data_fields ROW_FORMAT=Compressed;
ALTER TABLE mdl_enrol_paypal ROW_FORMAT=Compressed;
ALTER TABLE mdl_lti ROW_FORMAT=Compressed;
ALTER TABLE mdl_user ROW_FORMAT=Compressed;
ALTER TABLE mdl_user_info_field ROW_FORMAT=Compressed;


And everything appeared to work as far as the SQL commands go.There is still one error left, something about the slash arguments I ignored this and attempted installation anyway; it gets stuck on message_popup after you click continue.

I don't really know what to do about the slash arguments since I can't get into the user interface.  Installation just stops.


Average of ratings: Useful (1)
In reply to Andrew Leer

Re: Upgrading Moodle via migration to TKL?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Glad that you got the Barricuda issue sorted. To my knowledge it is not a stopper, neither the slasharguments. You must be able to continue. Are you sure that you are moving to 2.9, not 3.0? Read the version.php file in the main moodle directory (together with the config.php).
In reply to Visvanath Ratnaweera

Re: Upgrading Moodle via migration to TKL?

by Andrew Leer -

This looks kinda relevant but nothing on there appears to fit my issue.

In reply to Andrew Leer

Re: Upgrading Moodle via migration to TKL?

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

Try adding these lines to your apache config (if not there already).  If there make sure it is set to on.


<IfDefine APACHE2>
    AcceptPathInfo on
</IfDefine>

In reply to Andrew Leer

Re: Upgrading Moodle via migration to TKL?

by Andrew Leer -

The Baracudda issue didn't go away on its own as such, but the slash arguments did after I found out that the prefix was not specified in the config.php, and thus it was creating all new tables.


I also discovered that moodledata was housed in /www/moodledata/moodledata instead of /www/moodledata like I thought it was (on the other server it was in /var/moodledata


Thank you for your help!