Error while migrating existing Moodle 3.1.3 w/PostgreSQL to Google Cloud Platform

Error while migrating existing Moodle 3.1.3 w/PostgreSQL to Google Cloud Platform

by Jorge C -
Number of replies: 1

I'm using Google Cloud Platform + Cloud SQL with PostgreSQL to replicate a Moodle enviroment from a on-premise server, but i get the following error:

"Config table does not contain version, can not continue, sorry."

There's a link:

Missing Config Version

It's strange since i'm actually using the on-premise files (moodle & moodledata), i only edited the config.php to change the root and moodledata file paths, but the information is still the same.

Double checked the version from the version.php file of the moodle folder:

2016052303.00 (supposedly Moodle version 3.1.3)

which db table mdl_config value for version is 2016052303 (less .00) but anyways, the same version, as i pointed before, it's the actual on-premise, working version).

Even if i changed the version.php value to 2016052303 and keep the mdl_config value on 2016052303 with their due apache service restart/ complete instance restart and adding .00 to both values i still get this error.

NOTE: I can connect to PostgreSQL instance from the Google Cloud Compute Engine instance from a psql client, and i have the pgsql extension on php file. (5.6 version, again, same as the on-premise version).

I hope you can point me to the correct direction to solve this.


Average of ratings: -
In reply to Jorge C

Re: Error while migrating existing Moodle 3.1.3 w/PostgreSQL to Google Cloud Platform

by Ken Task -
Picture of Particularly helpful Moodlers

I, too, have a Google Compute Engine instance of a moodle.   Tried the Google Cloud SQL which is supposed to be 'high availability' (and it is - powerful, I imagine) but ... had to change strategy after the first months bill arrived.  Hope  you really need HA and can afford it.

My test with MySQL and it was darn simple ... just upload an .sql file.  Change config.php file and up and running.   Didn't have any issues like you are describing .... that value in the table, BTW, should not include the .00 and from what you've described sounds like it should work, but isn't.

How large/space is your Google Compute Engine instance?   Suggest installing a local PostGres on it and importing the PG dump to a DB right on the GCE instance.    Change config.php file only for the DB info.

Does it work?

The only reason I suggest ... am assuming your import of PG dump into GCSQL went without error.   But, if your moodle instance can't find that data, did the  import really fail?   Never did find any Google Tools that interacted with the GCSQL other than client.   Did find that running mysqltuner from the GCE instance recommended some tweaks be made, but  there is no my.cnf file to edit in GCSQL - had to be done via gcloud commands - kinda like MySQL Alter commands ... which needed to be made permanent.   And never did find anything where I could look at logs of the GCSQL instance. :\

'spirit of sharing', Ken