Re: How to move a database from HP server to Linux Server that had already one database.

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: How to move a database from HP server to Linux Server that had already one database.
Дата
Msg-id 4C6140CD0200002500034425@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: How to move a database from HP server to Linux Server that had already one database.  (Craig James <craig_james@emolecules.com>)
Список pgsql-admin
Craig James <craig_james@emolecules.com> wrote:

> If you have a slow network, then run pg_dump on the machine where
> the database lives and use compression (--format=c) and restore
> using pg_restore.  It will cut WAY down on the amount of data that
> has to move across the net.

If you don't mind dancing around a bit you can ssh from the target
to the source, run pg_dump piped to gzip there, gunzip the stream on
the target side, and still pipe it into psql without having to go
through the disk write/read cycle that --format=c requires.  Because
of the pain of getting all the quoting right when trying that as a
one-line bash command, I generally create a short script on the
source to do the dump and gzip.  The only other pain point is the
remote password.  .pgpass solves that.

-Kevin

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

Предыдущее
От: Craig James
Дата:
Сообщение: Re: How to move a database from HP server to Linux Server that had already one database.
Следующее
От: Gaurav Singh
Дата:
Сообщение: psql - password authentication failed for user "singh09721"