Upgrade from old version of KoBo (before March 2019, before kobo-install)

Greetings, we have installed the Kobo using the repository when there was no kobo-install.
So we’ve have been trying to first manually upgrade the Postgres database using the below link -
https://github.com/kobotoolbox/kobo-docker/blob/master/doc/March-2019-Upgrade.md

However we are facing an issue when trying to upgrade 9.4 version, the error message is this -
E: Version ‘2.5.4+dfsg-1.pgdg16.04+1’ for ‘postgresql-9.4-postgis-2.5’ was not found

It could not found the version 2.5.4 of Postgis for Postgres 9.4. Also found that Postgre 9.5 requries Postgis 2.5.4. But we are unable to upgrade 9.4 so as to match the Postgis version.
We are using Ubuntu 16.04
Can someone suggest any help? Thanks.

Hi @ryanend,

What you can try is to run a separate container of Postgres 9.5 (use the same as our stack) and create a dump from it. when running pg_dump, specify your Postgres 9.4 host and port (username and password).
The dump should be compatible with PostGIS 2.5.4 and PostgreSQL 9.5. When the dump is done, run kobo-install from shared-database-obsolete branch. (Specify new location for kobo-docker). It will create an empty database.
When it’s running, import your dump in the new postgres container. When it’s done and you can confirm it works, you can upgrade to master (or stable) of kobo-install to get the latest release.

Hope it helps.

3 Likes

Hi I’ve upgraded my existing database to Postgre 9.5 and MongoDb 3.4, how do I use the kobo-install? I dont have this folder, because we did notuse it for installation.
Also I dont want to do a fresh installation of kobo using kobo-install and later dump the data, I just want to upgrade.
Any possible solutions?
Thanks.

You can get kobo-install from https://github.com/kobotoolbox/kobo-install. Pay attention to ensure that you get the shared-database-obsolete branch that @nolive specified above. For example:

git clone --branch shared-database-obsolete https://github.com/kobotoolbox/kobo-install

It may be much easier for you to start with a “fresh” kobo-install environment, using the shared-database-obsolete branch, and then copy your kobo-docker/.vols directory into that new environment. I’ve described that in a response to your other post: Upgrading to separate databases for KPI and KoBoCAT.

Please be careful. Take backups before doing anything. We cannot guarantee quick help if something goes wrong.

2 Likes