Migrating from db in postgis 1.5 to db in postgis 2.5

116 views Asked by At

I have 2 servers with 2 postgresql. Server 1 has postgresql 8.4 and server 2 has postgresql 11.4.

I want to migrate databases from server 1 to server 2. However on server 1 has postgis 1.5 and server 2 has postgis 2.5.

Which means when I try to import databases I have an error concerning postgis version because it can't find the file, I get the following error message :

pg_restore: [archiver (db)] could not execute query: ERREUR: n'a pas pu accéder au fichier « $libdir/postgis-1.5 » : No such file or directory Command was: CREATE FUNCTION public.box2d_in(cstring) RETURNS public.box2d LANGUAGE c IMMUTABLE STRICT AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_in';

I was thinking to migrate postgis version from 1.5 to 2.5 of server 1 and then restore databases into server 2. But this way means a postgis 1.5 unsitall and 2.5 install.

I'd like to know if there is another way to do ?

I want to learn from this, so, if possible, explain to me what I'm doing wrong here, or if my approach is lacking insight.

0

There are 0 answers