A question often arises how to use the data stored in a PostGIS warehouse with the old open source version of PostGIS GDO. This article provides step-by-step instructions how to migrate from the old open source data server to the new one fully supported version.
First of all we need to emphasize two facts:
So it is clear that in order to manage the old data with the new GDO dataserver, the data must be transferred to a new database. We will explain steps needed to achieve that using the command line utilities provided by PostgreSQL.
First create a new database:
>createdb -T template0 mynewdb
go to the psql utility connecting to that new database:
>psql -d mynewdb
create the PostGIS extension using the two following commands:
##create extension postgis;
##create extension postgis_topology;
escape the psql using \q command.
If you don't want to connect to that database as superuser (recommended), change the database owner with running psql without database specified:
and from psql run the following command:
##alter database mynewdb owner to mygdouser;
Then run Database Utilities (the official one delivered with GeoMedia 2016 or newer), connect to this mynewdb database as the mygdouser (or as the superuser if you omitted the last step) and Create the Metadata tables. Close Database Utilities.
Run GeoMedia, connect to the old database using the old "PostGIS" data server, and then make a connection to the mynewdb using the new "PostGIS Read-Write" data server. Run the "Output to Feature Classes" command, select the source feature classes you want to export, and select the mynewdb connection as the target database. Click OK and the data should be copied to your new database. After that, you can start using the new PostGIS Read-Write dataserver to maintain your data with your new database.
Prior migrating your data into new database, you should be aware of some differences between the old and new version. There are basically two of them: