database transfer

Started by Ronnie Esguerraabout 25 years ago2 messagesgeneral
Jump to latest
#1Ronnie Esguerra
resguerra@solidservice.com.ph

Hi,

I will be moving my postgres database from one server to a new server. What
files do I need to move or how is it done?

Ronnie

#2Robert B. Easter
reaster@comptechnews.com
In reply to: Ronnie Esguerra (#1)
Re: database transfer

On Thursday 25 January 2001 03:46, Ronnie Esguerra wrote:

Hi,

I will be moving my postgres database from one server to a new server. What
files do I need to move or how is it done?

Ronnie

pg_dumpall the whole database to a file (pg_dumpall > dumpfile). Assuming you
use the PostgreSQL source code, configure and make postgres on the new
machine and do the regress tests (src/test/regress). If it's good, make
install, make postgres superuser unix account, then initdb as user postgres.
Finally, restore your dumpfile with psql -e template1 < dumpfile (the way man
pg_dumpall says to do it). I wouldn't try just copying files from one box to
another (except your dumpfile).

--
-------- Robert B. Easter reaster@comptechnews.com ---------
-- CompTechNews Message Board http://www.comptechnews.com/ --
-- CompTechServ Tech Services http://www.comptechserv.com/ --
---------- http://www.comptechnews.com/~reaster/ ------------