0

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

... ...

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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