Re: how to replicate a database from one machine to the other?

Поиск
Список
Период
Сортировка
От P Kapat
Тема Re: how to replicate a database from one machine to the other?
Дата
Msg-id daef5be80806261422m3c46ec96k4abaf5df47716963@mail.gmail.com
обсуждение исходный текст
Ответ на Re: how to replicate a database from one machine to the other?  (Shane Ambler <pgsql@Sheeky.Biz>)
Список pgsql-novice
On Wed, Jun 25, 2008 at 11:10 PM, Shane Ambler <pgsql@sheeky.biz> wrote:
> P Kapat wrote:
>>
>> A total novice here!
>>
>> Machine A: Kubuntu 8.04 has the required database under user userA
>> Machine B: RHEL 5 is the destination machine with userB
>>
>> I want to transfer the entire database under userA from machine A to
>> user B under machine B. Is that possible?
>>
> Yes.
>
> If the MachineB postgres version is older then you may have problems.
>
> MachineA
> pg_dump machineadb > madb.sql
>
> copy madb.sql across to machineB
>
> MachineB
> psql < madb.sql
>
> This would make a copy of the database named machineadb, if you want every
> db on the server then you can use pg_dumpall
>
> You may need options like -U -h and -W (username/host/prompt for password)
> man psql or man pg_dump for more detail

Thanks Shane, that worked. There were some errors for missing roles,
but that was expected since the usernames were different on the two
machines.

--
Regards
PK
--------------------------------------
http://counter.li.org #402424

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

Предыдущее
От: "Sérgio R F Oliveira"
Дата:
Сообщение: Sources of information about sizing of hardwares to run PostgreSQL
Следующее
От: "Ridvan Lakas ng Bayan S. Baluyos"
Дата:
Сообщение: Dumping tables with only create statements