4

I am unable to restore a database backup when the database contains schema's that contain geometry datatypes or postgis functions.

During restore, I get the spatial_ref_sys relation not found error. The backup file that pg_dump sets search paths that do not include the public schema.

Is there a way to produce a file that is restorable? Or will the backup file always require manual modification of the SET search_path = statement?

1

Run following command in cmd.

pg_dump -F c -h ip -p port -U user  -v databasename> path/file_name.dump

ip= Database IP address.

Port= Port of DB(5432 default)

user=DB user

databasename=name of your database.

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.