Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: how to repl...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 3147 of 3255
Post > Topic >>

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

by pgsql@[EMAIL PROTECTED] (Shane Ambler) Jun 26, 2008 at 12:40 PM

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

Feel free to compress the file to reduce transfer times etc.

You can also reduce it to one step -

pg_dump machineadb | psql -h remotename


-- 

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @[EMAIL PROTECTED]
 http://Sheeky.Biz

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 3 Posts in Topic:
how to replicate a database from one machine to the other?
kap4lin@[EMAIL PROTECTED]  2008-06-25 18:14:49 
Re: how to replicate a database from one machine to the
pgsql@[EMAIL PROTECTED]   2008-06-26 12:40:49 
Re: how to replicate a database from one machine to the other?
kap4lin@[EMAIL PROTECTED]  2008-06-26 17:22:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 2:22:16 CDT 2008.