<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,<br>
<br>
It seems that you try to restore a backup into a database who
included already PostGIS functions. To restore a PostGIS database,
you have to create first an empty database WITHOUT POSTGIS
functions. plpgsql language must be not created too.<br>
<br>
You have 3 options. You restore your backup file into an empty
database. If you use this option, it is important to note that your
PostGIS backup file must include the same version of PostGIS that
the one your installation is.<br>
<br>
If not, you need to have to do the 2nd option who is to use the
posgis_restore.pl script which should be located in your
share/contrib directory. For this last option, you need to install
Perl language on your box before. This script is a command line
restore script that remove from your backup file the old PostGIS
function and install new PostGIS functions. Your backup file must be
in Custom format (pg_dump -Fc...).<br>
<br>
If your backup is not created with -Fc option, you need to unzipped
it (if necessary), then remove in a text editor the lines who bug.
e.g. CREATE LANGAGE plpgsql... CREATE FUNCTION box_2d... etc. And
then, restore your file using pgAdmin.<br>
<br>
Hope it will be useful.<br>
<br>
Sylvain Racine<br>
<br>
On 2011-04-15 05:15, Raffaele Morelli wrote:
<blockquote
cite="mid:BANLkTinUoh1ujA5UKvPV_+x-wFMB7STs6g@mail.gmail.com"
type="cite">Hi,<br>
<br>
I have a serious problem in restoring a postgis enabled database
from one server to another and I don't know what the problem could
be.<br>
<br>
When trying to restore I got this lines (only the starting ones
here) from pgadmin interface. Any suggestion?<br>
<br>
best regards<br>
raffaele<br>
<br>
/usr/bin/pg_restore --host 127.0.0.1 --port 5432 --username
rmorelli --dbname cen_rf --verbose
"/home/rmorelli/Documents/backup/cen/cen_rf.backup"<br>
pg_restore: connessione al database per ripristino<br>
pg_restore: creazione di SCHEMA public<br>
pg_restore: creazione di COMMENT SCHEMA public<br>
pg_restore: creazione di PROCEDURAL LANGUAGE plpgsql<br>
pg_restore: [archiviatore (db)] Errore durante PROCESSING TOC:<br>
pg_restore: [archiviatore (db)] Errore nalla voce TOC 1265; 2612
49195 PROCEDURAL LANGUAGE plpgsql postgres<br>
pg_restore: [archiviatore (db)] could not execute query: ERROR:
language "plpgsql" already exists<br>
Command was: <br>
CREATE PROCEDURAL LANGUAGE plpgsql;<br>
pg_restore: creazione di SHELL TYPE box2d<br>
pg_restore: [archiviatore (db)] Errore nalla voce TOC 1151; 0 0
SHELL TYPE box2d postgres<br>
pg_restore: [archiviatore (db)] could not execute query: ERROR:
type "box2d" already exists<br>
Command was: CREATE TYPE box2d;<br>
pg_restore: creazione di FUNCTION box2d_in(cstring)<br>
pg_restore: [archiviatore (db)] Errore nalla voce TOC 84; 1255
49272 FUNCTION box2d_in(cstring) postgres<br>
pg_restore: [archiviatore (db)] could not execute query: ERROR:
function "box2d_in" already exists with same argument types<br>
Command was: CREATE FUNCTION box2d_in(cstring) RETURNS box2d<br>
LANGUAGE c IMMUTABLE STRICT<br>
AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_in';<br>
pg_restore: creazione di FUNCTION box2d_out(box2d)<br>
pg_restore: [archiviatore (db)] Errore nalla voce TOC 85; 1255
49273 FUNCTION box2d_out(box2d) postgres<br>
pg_restore: [archiviatore (db)] could not execute query: ERROR:
function "box2d_out" already exists with same argument types<br>
Command was: CREATE FUNCTION box2d_out(box2d) RETURNS cstring<br>
LANGUAGE c IMMUTABLE STRICT<br>
AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_...<br clear="all">
<br>
-- <br>
<i><span></span><span>L'unica speranza di catarsi, ammesso che ne
esista una,
resta affidata all'istinto di ribellione, alla rivolta non
isterilita
in progetti, alla protesta violenta e viscerale.</span></i><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
</body>
</html>