Thread: exclude a table from pg_dump

exclude a table from pg_dump

From
"Kostis Mentzelos"
Date:

Hi all,

is it possible to exclude a table from being pg_dumped?

 

In my case I need to backup everything except one table that is very large and I want to pg_dump it later

 

regards,

kostis.

 

Re: exclude a table from pg_dump

From
Andrew Sullivan
Date:
On Sun, Sep 22, 2002 at 02:27:52PM +0300, Kostis Mentzelos wrote:
> Hi all,
> is it possible to exclude a table from being pg_dumped?

Not really.  If you knew there were no connections (and therefore
no-one changing data) you could do it in a shell script, passing the
-t option to pg_dump for each table except the one you want.  But
that won't provide you with a truly guaranteed-consistent dump like a
normal pg_dump does.

I thought someone said something about adding a multiple-table
feature to the 7.3 pg_dump, but I just tried it on the beta, and it
didn't work differently than in 7.2.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110