From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | JORGE MALDONADO <jorgemal1960(at)gmail(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Backing up a DB excluding certain tables |
Date: | 2022-04-26 18:43:13 |
Message-ID: | 252494.1650998593@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
JORGE MALDONADO <jorgemal1960(at)gmail(dot)com> 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 the *-T* switch, the
> tables with the above pattern are created and I also want to exclude their
> creation. Is this possible? Or maybe I am not setting the pattern
> correctly. This is the command I am issuing:
> pg_dump -E win1252 -f c:/temp/respaldo.backup -F p -n riopoderoso -h
> localhost -p 5432 -U postgres -W -T aspnet*.* -s riopoderoso
"-n riopoderoso" is already restricting the dump to objects in
schema riopoderoso, so it doesn't look to me like that -T switch
is going to change anything.
I suspect the problem is somewhere else in your process. Maybe
you are restoring the backup into a database that isn't empty,
but already contains the aspnet*.* tables?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Talal Majali | 2022-04-26 18:51:54 | Physical replication high shared buffers hits |
Previous Message | andrew cooke | 2022-04-26 18:26:15 | How many max_replication_slots? |