From: Adrian Klaver <adrian.klaver@aklaver.com>
To: JORGE MALDONADO <jorgemal1960@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Backing up a DB excluding certain tables
Date: Thu, 28 Apr 2022 09:12:55 -0700
Message-ID: <6a59a991-672b-19fc-3e25-286f83cd519e@aklaver.com> (raw)
In-Reply-To: <CAAY=A7-FyONfqAF+Bc7=bk=jPL142p1FLf6J7f4K7aGO4x1o6A@mail.gmail.com>
References: <CAAY=A7-=_1xyODtD4QMhZQDek2BqP8krFZ8mAGxStDX_F6_LZA@mail.gmail.com>
<252494.1650998593@sss.pgh.pa.us>
<CAAY=A7--UtKZgmuoOtPuCTmf+fEX4Y8sUGo=Dw=wWbSZ=zG2Ow@mail.gmail.com>
<282742.1651016166@sss.pgh.pa.us>
<CAAY=A7-aRQ7SaEjVzpQXmtBsL+fAKE+aQmUwkgxM2D6NHDGSKQ@mail.gmail.com>
<1db41c48-0738-dabd-5155-52c7ce1a19de@aklaver.com>
<CAAY=A7-FyONfqAF+Bc7=bk=jPL142p1FLf6J7f4K7aGO4x1o6A@mail.gmail.com>
On 4/28/22 09:57, JORGE MALDONADO wrote:
> Good day,
>
> Here is the output to commands suggested by *Adrian Klaver*. Encoding is
> the same in both client and server. Also, there are 7 tables I want to
> exclude.
> image.png
> The version of source DB is 11, and target version is 14.
>
> Regarding the following comment:
>
> *FYI, -n riopoderoso and the riopoderoso in
> 'riopoderoso."AspNetRoleClaims"' are redundant.*
>
>
> Should I remove the schema name so the exclude switch is *-T "AspNet"*
> instead of *-T 'riopoderoso."AspNet"'?*
As Tom Lane pointed out earlier -n riopoderoso is going to restrict the
dump to objects in the riopoderoso schema so schema qualifying the table
name is not needed.
>
> I have tried -T 'riopoderoso."Asp*"', -T 'riopoderoso."Asp"*', -T
> '"Asp"*', -T "Asp"*' and several other combinations unsuccessfully.
> Also, I have escaped double quotes, single quotes and both at the same
> time using the *^* character as documented in several sources.
I don't use Windows much anymore and not all for Postgres so I can't
comment on this. Someone who does will need to offer guidance.
> Can I run the *pg_dump* command in *psql*? I rarely use psql.
No you can't run pg_dump in psql. Speaking of psql, what happens when
you log in with it? Do you get a code page warning?
>
> Regards,
> Jorge Maldonado
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, jorgemal1960@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Backing up a DB excluding certain tables
In-Reply-To: <6a59a991-672b-19fc-3e25-286f83cd519e@aklaver.com>
References: <CAAY=A7-=_1xyODtD4QMhZQDek2BqP8krFZ8mAGxStDX_F6_LZA@mail.gmail.com> <252494.1650998593@sss.pgh.pa.us> <CAAY=A7--UtKZgmuoOtPuCTmf+fEX4Y8sUGo=Dw=wWbSZ=zG2Ow@mail.gmail.com> <282742.1651016166@sss.pgh.pa.us> <CAAY=A7-aRQ7SaEjVzpQXmtBsL+fAKE+aQmUwkgxM2D6NHDGSKQ@mail.gmail.com> <1db41c48-0738-dabd-5155-52c7ce1a19de@aklaver.com> <CAAY=A7-FyONfqAF+Bc7=bk=jPL142p1FLf6J7f4K7aGO4x1o6A@mail.gmail.com> <6a59a991-672b-19fc-3e25-286f83cd519e@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox