Re: Backing up a DB excluding certain tables

2022-05-04 Thread Francisco Olarte
Replying to self... On Wed, 4 May 2022 at 19:19, Francisco Olarte wrote: > An I remember pg_dump had a catalog mode, but it seems to have > dissapeared in recent versions ( you gave it a switch, it wrote a > commented list > of IDs which you could edit ( normally avoiding reorders ) and feed > b

Re: Backing up a DB excluding certain tables

2022-05-04 Thread Francisco Olarte
Jorge: On Wed, 4 May 2022 at 18:12, JORGE MALDONADO wrote: > I just found the solution (or 1 solution). > It seems that the problem resides in tables with names containing characters > other than lowercase letters. > I want to exclude the following tables from the backup: > AspNetRoleClaims > A

Re: Backing up a DB excluding certain tables

2022-05-04 Thread JORGE MALDONADO
Hello, I just found the solution (or 1 solution). It seems that the problem resides in tables with names containing characters other than lowercase letters. I want to exclude the following tables from the backup: - AspNetRoleClaims - AspNetRoles - AspNetUserClaims - AspNetUserLogins

Re: Backing up a DB excluding certain tables

2022-05-03 Thread Adrian Klaver
On 5/3/22 10:26 AM, JORGE MALDONADO wrote: I included the space in chcp 1252, it was a typo in the last message I sent. This is what I just did as per your suggestion in a command prompt with Lucida Console font. C:\Users\JorgeMal>chcp Active code page: 437 C:\Users\JorgeMal>cmd.exe /c chcp 1

Re: Backing up a DB excluding certain tables

2022-05-03 Thread JORGE MALDONADO
I included the space in chcp 1252, it was a typo in the last message I sent. This is what I just did as per your suggestion in a command prompt with Lucida Console font. C:\Users\JorgeMal>chcp Active code page: 437 C:\Users\JorgeMal>cmd.exe /c chcp 1252 Active code page: 1252 C:\Users\JorgeMal>c

Re: Backing up a DB excluding certain tables

2022-05-03 Thread Adrian Klaver
On 5/3/22 09:10, JORGE MALDONADO wrote: Hi, I tried the suggestion in the "*Notes for Windows Users*" which recommends the following: The first suggestion says that 1252 is the code page for German. However, I used it because that is the code the DB was created with. When I ran the *cmd

Re: Backing up a DB excluding certain tables

2022-05-03 Thread JORGE MALDONADO
Hi, I tried the suggestion in the "*Notes for Windows Users*" which recommends the following: *psql is built as a “console application”. Since the Windows console windows use a different encoding than the rest of the system, you must take special care when using 8-bit characters within psql. If

Re: Backing up a DB excluding certain tables

2022-05-02 Thread Adrian Klaver
On 5/2/22 12:24, JORGE MALDONADO wrote: Hi, After a lot of tests and reading about the issue with the "*exclude table*" option on *pg_dump*, I found many articles saying that the problem has to do with the encoding of the DB. The DB I am testing with has a *WIN1252* encoding, so I decided to

Re: Backing up a DB excluding certain tables

2022-04-28 Thread JORGE MALDONADO
Yes, I get a warning when running psql as follows. I will search for help in Google and PostgreSQL documentation. The warning suggests *seeing psql reference page "Notes for Windows users"*. I will do that. I had not noticed the warning. Thank you. [image: image.png] Regards, Jorge Maldonado On

Re: Backing up a DB excluding certain tables

2022-04-28 Thread Tom Lane
JORGE MALDONADO writes: >> *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"'?* No. As I explained upthread, you'd better use either

Re: Backing up a DB excluding certain tables

2022-04-28 Thread Adrian Klaver
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 follow

Re: Backing up a DB excluding certain tables

2022-04-27 Thread Adrian Klaver
On 4/27/22 15:45, JORGE MALDONADO 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@lists.postgresql.org * list or also include individual emails like yo

Re: Backing up a DB excluding certain tables

2022-04-27 Thread David G. Johnston
On Wed, Apr 27, 2022 at 4:16 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Apr 27, 2022 at 3:46 PM JORGE MALDONADO > 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-genera

Re: Backing up a DB excluding certain tables

2022-04-27 Thread David G. Johnston
On Wed, Apr 27, 2022 at 3:46 PM JORGE MALDONADO 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@lists.postgresql.org > * list or also include individual > emails like yours and Adrian's. > >

Re: Backing up a DB excluding certain tables

2022-04-27 Thread JORGE MALDONADO
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@lists.postgresql.org * list or also include individual emails like yours and Adrian's. I have tried many ways to make this pg_dump command work without succe

Re: Backing up a DB excluding certain tables

2022-04-26 Thread Tom Lane
[ please keep the list cc'd ] JORGE MALDONADO writes: > As for the answer by *Tom Lane*, I am not restoring the DB but only getting > the backup in plain format. I see that tables that contain "AspNet" in > their name are part of the resulting dumped file. For example, the > following is part of

Re: Backing up a DB excluding certain tables

2022-04-26 Thread Tom Lane
JORGE MALDONADO writes: > I am using *pg_dump* to backup a DB but I would like to exclude some tables > so I added the *-T* switch with a pattern like this: *aspnet*.**. The > backup command includes the *-s* switch to consider the schema only > because I do not need the data. However, even with

Re: Backing up a DB excluding certain tables

2022-04-26 Thread Adrian Klaver
On 4/26/22 12:15 PM, JORGE MALDONADO wrote: Hi, I am using *pg_dump* to backup a DB but I would like to exclude some tables so I added the *-T* switch with a pattern like this: *aspnet*.**. The backup command  includes the *-s* switch to consider the schema only because I do not need the data

Backing up a DB excluding certain tables

2022-04-26 Thread JORGE MALDONADO
Hi, I am using *pg_dump* to backup a DB but I would like to exclude some tables so I added the *-T* switch with a pattern like this: *aspnet*.**. The backup command includes the *-s* switch to consider the schema only because I do not need the data. However, even with the *-T* switch, the tables