pg_dump does refuse to dump a given schema in my DB.

pg_dump -d <dbname> -s -n dm_geo -f <filename>


-- PostgreSQL database dump 

-- Dumped from database version 9.5.4
-- Dumped by pg_dump version 9.5.4

SET statement_timeout = 0; 
SET row_security =off;

-- PostgreSQL database dump complete
  • Under which user do you run pg_dump? Does it has (PostgreSQL) access to the schema you are trying to dump? – Patrick Mevzek Dec 28 '17 at 14:35

Seems your command is wrong, Follow the below command to dump dm_geo schema.

To dump without data

pg_dump dbname -s -n dm_geo -f backup.sql

To dump schema and data

pg_dump dbname -n dm_geo -f backup.sql
  • sorry, due to "tags" seems my command got incorrect in the post. I did run exactly as you do indicate but got incomplete results – user141376 Dec 28 '17 at 11:41
  • I have edited your question, please take a review, So someone can able to identify the exact problem. – Bhuvanesh Dec 28 '17 at 11:42
  • This dump command will work actually, I verified. Kindly share if you got any info message while taking the dump. – Bhuvanesh Dec 28 '17 at 11:54

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.