Re: Dump large DB and restore it after all. - Mailing list pgsql-general

From Christian Ullrich
Subject Re: Dump large DB and restore it after all.
Date
Msg-id iuumhr$i26$1@dough.gmane.org
Whole thread Raw
In response to Dump large DB and restore it after all.  (Condor <condor@stz-bg.com>)
List 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 by date:

Previous
From: "Tomáš Vondra"
Date:
Subject: Re: Difference in DB size with dump and pg_database_size
Next
From: Craig Ringer
Date:
Subject: Re: Dump large DB and restore it after all.