Re: Backing up a DB excluding certain tables

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Backing up a DB excluding certain tables
Date: 2022-04-27 23:38:47
Message-ID: CAKFQuwaQtbQfdzBtA3O+-Asf+OeKGiUyrEHW7BQ6qfiC7NUJ6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 27, 2022 at 4:16 PM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Wed, Apr 27, 2022 at 3:46 PM JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
> wrote:
>
>> Is this the correct way to answer when you say that I must *keep the
>> list cc'd*? I am not sure if I only have to reply to the *pgsql-general(at)lists(dot)postgresql(dot)org
>> <pgsql-general(at)lists(dot)postgresql(dot)org>* list or also include individual
>> emails like yours and Adrian's.
>>
>>
> Most of us prefer (or at least I don't see many complaints - I do have a
> preference for being included specifically) if the individual responders
> are kept too (reply-all) but in any case the list needs to be addressed.
>
> The additional convention is to inline post (with trimming) as opposed to
> top-posting like you did here. As a secondary option, bottom-post.
>
> I have tried many ways to make this pg_dump command work without success.
>> I just do not know what is going on. The last test I performed was as
>> follows which only excludes 1 table in the *riopoderoso* schema but it
>> did not work. Such a table is included in the resulting backup plain format
>> file.
>>
>> *pg_dump -E win1252 -f c:/temp/respaldo.backup -n riopoderoso -F p -h
>> localhost -p 5432 -U postgres -W -s -T 'riopoderoso."AspNetRoleClaims"'
>> riopoderoso*
>>
>
> That doesn't make any sense.
>
> Using a clean testing database are you able to reproduce the problem?
>
> What version of PostgreSQL and from where?
>
> If you substitute in ? for various characters in the name (particularly
> the table name portion) can you make it work? Is there some kind of
> encoding difference so the name you are typing in pg_dump and the name
> stored in the database, while looking the same, are actually different?
> Copy-and-paste the name from the pg_dump file back into the command line.
>
>
Also, which shell are you using? Maybe it doesn't like single quotes for
arguments/options, only double-quotes, so the single quotes are becoming
part of the argument input?

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2022-04-27 23:44:14 Re: parallel-processing multiple similar query tasks - any example?
Previous Message Shaozhong SHI 2022-04-27 23:34:38 parallel-processing multiple similar query tasks - any example?