Re: restoring database

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: restoring database
Дата
Msg-id 20031222233735.GA2752@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: restoring database  (Lucas Lain <lainl@aconectarse.com>)
Список 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 по дате отправления:

Предыдущее
От: Andrew Ayers
Дата:
Сообщение: Parser: parse error - please help...
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Parser: parse error - please help...