Re: [GENERAL] Copy a database.

Поиск
Список
Период
Сортировка
От Tom Ivar Helbekkmo
Тема Re: [GENERAL] Copy a database.
Дата
Msg-id 86yalpph60.fsf@athene.nhh.no
обсуждение исходный текст
Ответ на Copy a database.  (Manik Surtani <manik@post1.com>)
Список pgsql-general
Manik Surtani <manik@post1.com> writes:

> I currently have a whole bunch of records in a database on one machine.
> I want to copy it all to an identical postgres setup on another
> machine.  I have already created all the necessary tables, with
> identical structures.  i just want to copy the records across.

On the "old" machine:

% pg_dump -a -D -f mydb.dump mydb

Then move mydb.dump to the new machine, and do:

% psql mydb
mydb=> \i mydb.dump

For more information, see 'man pg_dump'.

-tih
--
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

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

Предыдущее
От: Manik Surtani
Дата:
Сообщение: Copy a database.
Следующее
От: "K.T."
Дата:
Сообщение: Re: [GENERAL] Copy a database.