[postgis-users] upgrade from 1.3.2 to 2.0.1

Eugenio Trumpy frippe12573 at hotmail.com
Wed Jul 25 03:57:23 PDT 2012


Hi to all,I'm new in this mailing list.In these days I have some problems upgrading some databases from 1.3.2 postgis versionto new 2.0.1 version.I read some information pages as [1], [2], [3], and others...This is the situation:The postgresql database 8.2.6 run in linux debian squeeze server with postgis 1.3.2. {old}I have inside the database somthing like 20 spatial db.Now, I would like to upgrade the server, so I installed, on compiling way, the postgresql9.1.4 on a different port. The two database run ok concurrently. On postgresql 9.1.4I installed, compiling, postgis 2.0.1.That is still ok.The problem is how to migrate the data.I started with pg_dumpall, but the first problme was the different encoding of the two clusters,so i used pg_dump with -E UTF8 for each db. I think the dump file are ok.The further step, as you know, invole the restore, so my problem start.At this time i discovered that postgis 2 has geometry_columns as view and not as table in public schema,and may be this is one of the most problem I have, in fact when I tried to import data with psql,something went wrong, and only the table in the others database schema has imported.I tried also with pg_dump with -Fc option, but i got the same problem.So i tried both run legacy.sql on the new database created and  postgis_restore.pl,but the last one give me:
postgres at servergis:~$ perl /usr/local/pgsql914/share/contrib/postgis-2.0/postgis_restore.pl "/home/postgres/bdng_261.sql" Converting /home/postgres/bdng_261.sql to ASCII on stdout...  Reading list of functions to ignore...  Writing manifest of things to read from dump file...pg_restore: [archiviatore] versione (1.12) non supportata nell' header del file/usr/local/pgsql914/share/contrib/postgis-2.0/postgis_restore.pl: pg_restore returned an error
For example in the [2] he suggest don't use the public schema for the data, so i'm wondering ifi have to move the data from public schema to another one then make pg_dump end restore,or there is a shorter way to get the result?
Could someone suggest me a way to restore the data correctly?
Best regards
Eugenio

[1] http://postgis.refractions.net/docs/postgis_installation.html#upgrading[2] http://blog.cleverelephant.ca/2010/09/postgis-back-up-restore.html[3]  http://www.postgresql.org/docs/9.0/static/migration.html 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120725/1bb58a98/attachment.html>


More information about the postgis-users mailing list