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

Amey Abhyankar sco1984 at gmail.com
Mon May 13 10:31:56 IST 2019


Hello,

On Fri, 19 Apr 2019 at 23:32, Shridhar Daithankar
<ghodechhap at ghodechhap.net> wrote:
>
> 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?

Due to some dependencies I just took backup of whole DB i.e. = pg_dump
-U postgres -f /tmp/app1_data.sql app1
But I am looking for syntax where I can exclude multiple schema's
while taking backup of respective DB.

Regards,
Amey.
>
> --
> Regards
>  Shridhar
>
>
> _______________________________________________
> plug-mail mailing list
> plug-mail at plug.org.in
> http://list.plug.org.in/listinfo/plug-mail


More information about the plug-mail mailing list