Re: restoring database - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: restoring database
Date
Msg-id 20031222233735.GA2752@dcc.uchile.cl
Whole thread Raw
In response to Re: restoring database  (Lucas Lain <lainl@aconectarse.com>)
List pgsql-general
On Mon, Dec 22, 2003 at 08:14:51PM -0300, Lucas Lain wrote:

> > If it's a plain text dump, make a copy of the backup file.  Edit the
> > copy and delete everything that doesn't relate to the database to be
> > restored.
>
> it's quite large to do this ...

Maybe you could try getting the line numbers for the data you want using
grep (be sure to anchor the patterns with ^ to make the search faster),
and then extract the data using either awk (see NR) or perl (see $.).
This way you don't have to open the dump with an editor, which would
load the whole file in memory.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La fuerza no está en los medios físicos
sino que reside en una voluntad indomable" (Gandhi)

pgsql-general by date:

Previous
From: Andrew Ayers
Date:
Subject: Parser: parse error - please help...
Next
From: Alvaro Herrera
Date:
Subject: Re: Parser: parse error - please help...