From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: suhailck@gmail.com
To: pgsql-admin@postgresql.org
Subject: Re: conditional backup
Date: Fri, 16 Jul 2010 10:48:12 -0500
Message-ID: <4C4038EC0200002500033719@gw.wicourts.gov> (raw)
References: <4C4038AC0200002500033716@gw.wicourts.gov>
<4C4038EC0200002500033719@gw.wicourts.gov>
suhailck <suhailck@gmail.com> wrote:
> I need to take backup of my postgresql DB, but not all records
> from a few tables.
You can exclude particular tables from a database backup using the
-T option (which can be included multiple times). You can dump just
the schema for particular tables with the -s and -t switches. You
can use the \copy command in psql to copy out selected rows using
syntax like:
\copy (select * from C_order where period=2009 and org <> 'A') to
C_order.data
You should be able to wire something together from those pieces.
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, suhailck@gmail.com
Subject: Re: conditional backup
In-Reply-To: <4C4038EC0200002500033719@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox