| From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
|---|---|
| To: | Lucas Lain <lainl(at)aconectarse(dot)com> |
| Cc: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, PostgreSQL general list <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: restoring database |
| Date: | 2003-12-22 23:37:35 |
| Message-ID: | 20031222233735.GA2752@dcc.uchile.cl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2003-12-22 23:43:52 | Re: Parser: parse error - please help... |
| Previous Message | Andrew Ayers | 2003-12-22 23:24:52 | Parser: parse error - please help... |