Обсуждение: moving DB
Hi all! well, can somebody tell me how to move a DB (e.g. I have a DB named NET in PC1 under pg6.5.3 and I want to put it in PC2 under pg7.0) should I copy just the data/base/NET/ directory and the paste it in the data/base of the PC2... which are the exactly steps... :o) thanx Rocael ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1
On Sat, 12 Jul 2036, rocael@usa.net wrote: > Hi all! > > well, can somebody tell me how to move a DB (e.g. I have a DB named NET in > PC1 under pg6.5.3 and I want to put it in PC2 under pg7.0) > should I copy just the data/base/NET/ directory and the paste it in the > data/base of the PC2... No, No, don't do that. pg7.x cannot read databases created by pg6.5.3 > which are the exactly steps... > > :o) thanx use pg_dumpall on PC1 and then read it back in on the other system. pg_dumpall -o > db.out # on PC1 move the db.out file to PC2 in whatever way is appropriate. psql -e template1 < db.out # on PC2 -- Sincerely etc., NAME Christopher Sawtell - iOpen Technologies Ltd. CELL PHONE 021 257 4451 ICQ UIN 45863470 EMAIL chris @ iopen . co . nz, csawtell @ xtra . co . nz WWW http://www.iopen.co.nz CNOTES ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz -->> Please refrain from using HTML or WORD attachments in e-mails to me <<--
I think you want to use pg_dump or pg_dumpall (see the man pages). Part of
the description for pg_dump:
pg_dump is a utility for dumping out a Postgres database
into a script file containing query commands. The script
files are in text format and can be used to reconstruct
the database, even on other machines and other architec<AD>
tures. ......
Good luck and let me know if this works. I'm thinking of doing an upgrade
from 6.5.3 to 7.x on the same machine.
Pat
Patrick C. Wolf
Test Manager
Aerojet
Socorro Plant
-----Original Message-----
From: rocael@usa.net [mailto:rocael@usa.net]
Sent: Monday, June 05, 2000 8:01 PM
To: pgsql-novice@postgresql.org;
pgsql-sql@postgresql.org
Subject: [NOVICE] moving DB
Hi all!
well, can somebody tell me how to move a DB (e.g. I have a
DB named NET in
PC1 under pg6.5.3 and I want to put it in PC2 under pg7.0)
should I copy just the data/base/NET/ directory and the
paste it in the
data/base of the PC2...
which are the exactly steps...
:o) thanx
Rocael
____________________________________________________________________
Get free email and a permanent address at
http://www.netaddress.com/?N=1