Re: Copy one database to another server

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: Copy one database to another server
Дата
Msg-id CAGrpgQ9R-_cD5DDYgfZzfjvaNW0pAQd8P=oPhRrtnND-oa9gbA@mail.gmail.com
обсуждение исходный текст
Ответ на Copy one database to another server  (Huan Ruan <huan.ruan.it@gmail.com>)
Список pgsql-admin
On Thu, May 2, 2013 at 3:01 PM, Huan Ruan <huan.ruan.it@gmail.com> wrote:
  • create a new db using the current one as a template. Easy to do and speed is acceptable. A bit downtime is ok, but it's only on the current server. Is there a way to move it to anther server?

FWIW, I recently set up a 160GB clone by simply piping from pg_dump over the network into psql, alleviating the need to dump to disk. In my case, the server did not have enough space to hold the pg_dump, so I had to stream it.

pg_dump -Fp your_db | psql -h new_server -U postgres your_new_db

You could also search the archives for caveats and other (and safer) ways to do this.

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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Copy one database to another server
Следующее
От: Nghia Truong
Дата:
Сообщение: Problem: pg_hba.conf is automatically rewritten every day