Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am attempting to dump/restore a database between servers. Here is what I have tried is

DUMP:

pg_dump -h localhost -U user database > dump.sql

Restore Onto other server:

createdb -h localhost -U postgres -T template0 database
psql -d database -U postgres -h localhost -f dump.sql

psql:rocdocs.sql:35: ERROR:  could not access file "/usr/lib/postgresql/8.3/lib/liblwgeom": No such file or directory
psql:rocdocs.sql:38: ERROR:  function public.st_box2d_in(cstring) does not exist
psql:rocdocs.sql:46: ERROR:  could not access file "/usr/lib/postgresql/8.3/lib/liblwgeom": No such file or directory
psql:rocdocs.sql:49: ERROR:  function public.st_box2d_out(box2d) does not exist
psql:rocdocs.sql:61: ERROR:  function st_box2d_in(cstring) does not exist

... ...

share|improve this question

1 Answer 1

up vote 0 down vote accepted

This error is caused by lack of PostGIS shared libraries.

In general, to guarantee successful restore, you should have installed all the same extensions/contrib modules/addons/extras, which were installed in the primary server. This will guarantee that all shared libraries are in place.

Install PostGIS (same version) in the server, and retry.

See

PS. You did not specify your PostgreSQL / PostGIS version, this is needed if you need more help.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.