Search Postgresql Archives

Re: Dump large DB and restore it after all.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux