Re: Exclude bdr data from dump

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Roland van Laar <roland(at)micite(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Exclude bdr data from dump
Date: 2016-01-14 16:24:57
Message-ID: 5697CBD9.4000508@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/13/2016 12:18 PM, Roland van Laar wrote:
> Hello,
>
> I want to exclude all bdr data from a database dump.
> My command is:
>
> $ bdr_dump -Fp -h localhost -U postgres mydb -f /tmp/mydb.data
> --data-only --exclude-table='bdr*
>
> This results in bdr data being included.

Did you mean excluded above?

>
> Including only bdr results in an error:
>
> $ bdr_dump -Fp -h localhost -U postgres mydb -f /tmp/mydb.data
> --data-only --table='bdr*'
> bdr_dump: No matching tables were found

Per the docs:

http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html

--table=table

Note: The behavior of the -t switch is not entirely upward compatible
with pre-8.2 PostgreSQL versions. Formerly, writing -t tab would dump
all tables named tab, but now it just dumps whichever one is visible in
your default search path. To get the old behavior you can write -t
'*.tab'. Also, you must write something like -t sch.tab to select a
table in a particular schema, rather than the old locution of -n sch -t tab.

So have you tried schema qualifying the table name?

>
> Please help.
>
> Roland
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-01-14 16:30:56 Re: WIP: CoC V5, etc., etc., etc., etc., ....
Previous Message Joshua D. Drake 2016-01-14 16:24:28 Re: WIP: CoC V5, etc., etc., etc., etc., ....