Re: dumping strategy - Mailing list pgsql-general

From Neil Conway
Subject Re: dumping strategy
Date
Msg-id 20010531170816.A181@klamath.dyndns.org
Whole thread Raw
In response to Re: dumping strategy  ("Richard Huxton" <dev@archonet.com>)
Responses Re: dumping strategy  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, May 31, 2001 at 11:49:48AM +0100, Richard Huxton wrote:
> From: <newsreader@mediaone.net>
> > pg_dump works but I have to write
> > a shell script to dump each individual tables.
> >
> > What I meant by it does not work is like this
> >
> > pg_dump -t table1 table2 table3 database |bzip2 > database.du
>
> It's just
>
> for i in t1 t2 t3; do pg_dump -t$i mydb > $i.tbl; done

Although with a strategy like this, they're no guarantee that the
snapshot you get will be consistent. And if you're using refential
integrity it might not even restore properly.

Cheers,

Neil


pgsql-general by date:

Previous
From: Limin Liu
Date:
Subject: extra syntax on INSERT
Next
From: Peter Eisentraut
Date:
Subject: Re: PostgreSQL security concerns