Postgresql – pg_dump issue while dumping single schema

pg-dumppostgresql

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

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

Result

-- 
-- 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
--

Best Answer

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