[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] upgrade from 1.3.2 to 2.0.1
From:       Eugenio Trumpy <frippe12573 () hotmail ! com>
Date:       2012-07-25 10:57:23
Message-ID: DUB108-W63012E026ADBDF6DC0CCA9E5C30 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi to all=2CI'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]=2C [2]=2C [3]=2C and others...This is th=
e situation:The postgresql database 8.2.6 run in linux debian squeeze serve=
r with postgis 1.3.2. {old}I have inside the database somthing like 20 spat=
ial db.Now=2C I would like to upgrade the server=2C so I installed=2C on co=
mpiling way=2C the postgresql9.1.4 on a different port. The two database ru=
n ok concurrently. On postgresql 9.1.4I installed=2C compiling=2C postgis 2=
.0.1.That is still ok.The problem is how to migrate the data.I started with=
 pg_dumpall=2C but the first problme was the different encoding of the two =
clusters=2Cso i used pg_dump with -E UTF8 for each db. I think the dump fil=
e are ok.The further step=2C as you know=2C invole the restore=2C so my pro=
blem start.At this time i discovered that postgis 2 has geometry_columns as=
 view and not as table in public schema=2Cand may be this is one of the mos=
t problem I have=2C in fact when I tried to import data with psql=2Csomethi=
ng went wrong=2C and only the table in the others database schema has impor=
ted.I tried also with pg_dump with -Fc option=2C but i got the same problem=
.So i tried both run legacy.sql on the new database created and  postgis_re=
store.pl=2Cbut the last one give me:
postgres@servergis:~$ perl /usr/local/pgsql914/share/contrib/postgis-2.0/po=
stgis_restore.pl "/home/postgres/bdng_261.sql" Converting /home/postgres/bd=
ng_261.sql to ASCII on stdout...  Reading list of functions to ignore...  W=
riting manifest of things to read from dump file...pg_restore: [archiviator=
e] 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=
=2C so i'm wondering ifi have to move the data from public schema to anothe=
r one then make pg_dump end restore=2Cor 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 		 	   		   		 	  =
 		  =

[Attachment #5 (text/html)]

<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 &nbsp;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"&nbsp;</div><div>Converting /home/postgres/bdng_261.sql \
to ASCII on stdout...</div><div>&nbsp; Reading list of functions to \
ignore...</div><div>&nbsp; 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]&nbsp;<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]&nbsp;<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] \
&nbsp;<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>



_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic