<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<div><div dir="ltr">Hi to all,<div>I'm new in this mailing list.</div><div>In these days I have some problems upgrading some databases from 1.3.2 postgis version</div><div>to new 2.0.1 version.</div><div>I read some information pages as [1], [2], [3], and others...</div><div>This is the situation:</div><div>The postgresql database 8.2.6 run in linux debian squeeze server with postgis 1.3.2. {old}</div><div>I have inside the database somthing like 20 spatial db.</div><div>Now, I would like to upgrade the server, so I installed, on compiling way, the postgresql</div><div>9.1.4 on a different port. The two database run ok concurrently. On postgresql 9.1.4</div><div>I installed, compiling, postgis 2.0.1.</div><div>That is still ok.</div><div>The problem is how to migrate the data.</div><div>I started with pg_dumpall, but the first problme was the different encoding of the two clusters,</div><div>so i used pg_dump with -E UTF8 for each db. I think the dump file are ok.</div><div>The further step, as you know, invole the restore, so my problem start.</div><div>At this time i discovered that postgis 2 has geometry_columns as view and not as table in public schema,</div><div>and may be this is one of the most problem I have, in fact when I tried to import data with psql,</div><div>something went wrong, and only the table in the others database schema has imported.</div><div>I tried also with pg_dump with -Fc option, but i got the same problem.</div><div>So i tried both run legacy.sql on the new database created and  postgis_restore.pl,</div><div>but the last one give me:</div><div><br></div><div><div>postgres@servergis:~$ perl /usr/local/pgsql914/share/contrib/postgis-2.0/postgis_restore.pl "/home/postgres/bdng_261.sql" </div><div>Converting /home/postgres/bdng_261.sql to ASCII on stdout...</div><div>  Reading list of functions to ignore...</div><div>  Writing manifest of things to read from dump file...</div><div>pg_restore: [archiviatore] versione (1.12) non supportata nell' header del file</div><div>/usr/local/pgsql914/share/contrib/postgis-2.0/postgis_restore.pl: pg_restore returned an error</div></div><div><br></div><div>For example in the [2] he suggest don't use the public schema for the data, so i'm wondering if</div><div>i have to move the data from public schema to another one then make pg_dump end restore,</div><div>or there is a shorter way to get the result?</div><div><br></div><div>Could someone suggest me a way to restore the data correctly?</div><div><br></div><div>Best regards</div><div><br></div><div>Eugenio</div><div><br></div><div><br></div><div>[1] <a href="http://postgis.refractions.net/docs/postgis_installation.html#upgrading" target="_blank">http://postgis.refractions.net/docs/postgis_installation.html#upgrading</a></div><div>[2] <a href="http://blog.cleverelephant.ca/2010/09/postgis-back-up-restore.html" target="_blank">http://blog.cleverelephant.ca/2010/09/postgis-back-up-restore.html</a></div><div>[3]  <a href="http://www.postgresql.org/docs/9.0/static/migration.html" target="_blank">http://www.postgresql.org/docs/9.0/static/migration.html</a></div>                                         </div></div>                                        </div></body>
</html>