Re: Dump large DB and restore it after all.

Поиск
Список
Период
Сортировка
От Christian Ullrich
Тема Re: Dump large DB and restore it after all.
Дата
Msg-id iuumhr$i26$1@dough.gmane.org
обсуждение исходный текст
Ответ на Dump large DB and restore it after all.  (Condor <condor@stz-bg.com>)
Список pgsql-general
* Condor wrote:

> Problem was when I start: pg_dump dbname | split -b 1G - filenameI
> unable to restore it correct. When I start restore DB i got error from
> sql he did not like one line. I make investigation and the problem was
> in last line of first file value field was something like '"This is a '
> and here file over. I added single quotes in the example that I can pay
> the phrase to make it clear what I mean. In next file sentence was end
> correct 'simple test"' (also without single quotes) and this was not

psql does not know that you split the file. You must send the whole dump
to psql at once, not piece by piece.

Instead of

    psql dbname < filename.1
    psql dbname < filename.2

do this:

    cat filename.1 filename.2 | psql dbname

--
Christian


В списке pgsql-general по дате отправления:

Предыдущее
От: "Tomáš Vondra"
Дата:
Сообщение: Re: Difference in DB size with dump and pg_database_size
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Dump large DB and restore it after all.