[PLUG] How to take pg dump by excluding more than 1 schema?

Shridhar Daithankar ghodechhap at ghodechhap.net
Fri Apr 19 23:32:20 IST 2019


On शुक्रवार, १९ एप्रिल, २०१९ १:३६:५८ म.उ. IST Amey Abhyankar wrote:
> Hello,
> 
> I have postgresql 9.x DB.
> I want to take backup of 1 DB.
> How to take backup from cmdline/bash using pgdump command?
> I can not take backup using pgadmin or dbeaver UI due to some issues.
> 
> I can use = pg_dump -Fp -v -h mydbsvip.srv -U postgres app01 >
> app01_data.dump --exclude-schema log

You are redirecting in mid command?

> 
> But If I put -N or -n & 'some_schema.another_*_pattern_*' it's not working.

some_schema.another_*_pattern_* indicates object in that schema, not the 
schema itself. 

The intended usage of pattern seems to be, '-n *schema*' to include/exclude 
aschema1, bschema2 etc.

What is exactly the error? what is the exact command that you are running?

-- 
Regards
 Shridhar




More information about the plug-mail mailing list