[postgis-users] Database restore fails with missing liblwgeom

Paragon Corporation lr at pcorp.us
Fri Oct 22 09:50:44 PDT 2010


Lee,

No you can't ignore the type geometry does not exist error.

We usually do compressed tar  backups since you have more control over what
you restore and whether to ignore errors, overwrite etc etc.

I haven't tried restoring full dumps in a while, but they are mostly
designed for disaster recovery when you need to restore the whole server.  I
suspect its just overwriting the databases entirely so your new postgis
installs are being wiped out.

Couple of options come to mind
Option 1
 If you still have your old install do postgresql compressed  backup using
pg_dump   of the database and restore as we described
This might help
http://www.postgresonline.com/journal/archives/63-PostgreSQL-8.3-Pg_dump-Pg_
Restore-Cheatsheet-Overview.html

Option 2
1) Macro replace your dumpfile -- all references to liblwgeom.so change to
postgis-1.5.so
(You can use sed or perl or whatever you feel comfortable with) -- don't
recall the commands off hand.
2) then run the soft upgrade script in share/contrib/postgis-1.5 folder

The second option should work (then afterward do a soft upgrade) -- though
keep in mind haven't tested it but you will get some errors with functions
that have been removed etc.

Leo
http://www.postgis.us





-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Lee
Hughes
Sent: Thursday, October 21, 2010 6:55 PM
To: postgis-users at postgis.refractions.net
Subject: Re: [postgis-users] Database restore fails with missing liblwgeom

The databases were created by restoring the pg_dumpall backup, so I
installed Postgis (psql -d [yourdatabase] -f postgis.sql) in all of them and
tried the restore again, with the same errors. In addition to the liblwgeom
errors (below), which presumably I can ignore, the restore also errors with
"type geometry does not exist". Can I ignore those errors too?

Thanks for the help.

> Date: Tue, 19 Oct 2010 20:17:25 -0400
> From: "Paragon Corporation" <lr at pcorp.us>
> Subject: Re: [postgis-users] Database restore fails with missing
> 	liblwgeom
> To: "'PostGIS Users Discussion'"
> 	<postgis-users at postgis.refractions.net>
> Message-ID: <61923D39EDD5403CB5F5C31ABAB20DE6 at J>
> Content-Type: text/plain;	charset="us-ascii"
>
> Lee,
>
> The liblwgeom.so was renamed in postgis 1.4 to postgis-1.4... So, 
> postgis-1.5... So
>
> The easiest way to restore your data is to
>
> 1) Create a new database
> 2) install PostGIS 1.5  (the install files should bie in
> share/contrib/postgis-1.5
> 3) Then restore your data on top
> 4) You'll should then get errors that the functions already exist and 
> they will be skipped.  You may get some errors too about the 
> liblwgeom, but those you can ignore (unless you are using them)  since 
> they represent functions long ago deprecated that got taken out of
> postgis-1.5
>
> Leo
> http://www.postgis.us
>
>
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of 
> Lee Hughes
> Sent: Tuesday, October 19, 2010 7:15 PM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] Database restore fails with missing liblwgeom
>
> Restoring a pg_dumpall backup from a Postgres 8.1.3 + Postgis 1.1.4 
> server on a Postgres 9 + Postgis 1.5.2 server fails with
>
> could not access file "$libdir/liblwgeom.so.1.1": No such file or 
> directory
>
> Postgis compiled/installed fine, and make check passed all tests.
> There are no files like liblwgeom.so anywhere on the server, just 
> liblwgeom.a and liblwgeom.h in /usr/local/src/postgis-1.5.2/liblwgeom/.
>
> Any ideas greatly appreciated.
>
> Thanks-
>
> Lee

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





More information about the postgis-users mailing list