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
- AspNetUserRoles
- AspNetUserTokens
- AspNetUsers
- __EFMigrationsHistory
One pg_dump command that worked correctly is as follows:
pg_dump -f c:/temp/respaldo.backup -n riopoderoso -F p -h localhost -p 5433 -U postgres -W -s -T *.?sp?et* -T *.*igrations?istory riopoderoso
As you can see, uppercase letters and underscore characters were avoided in both -T arguments. In this way, the dumped file was generated successfully without the files listed above.
It was not even necessary to issue the command cmd.exe /c chcp 1252 in the command prompt before running pg_dump.
I also tried different combinations of single quotes and double quotes but none worked.
This behavior of characters other than lowercase letters in table names is present no matter if the database is originally created with UTF8 encoding. The problem persists in such a case too.
Regards,
Jorge Maldonado
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 1252
> Active code page: 1252
>
> C:\Users\JorgeMal>chcp
> Active code page: 1252
>
>
> The result always included tables with *AspNet* in the name.
I am at a loss for an answer. I just don't use Windows enough to know
where to go from here.
>
> Regards,
> Jorge Maldonado
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com