Thread: postgres

postgres

From
"mallice"
Date:
Hi ,
i had create a database named "mydata" with postgres 7 and i had no problems
with it.Then i copy mydata/ to another computer which is well configured.But
i can't access to my database   the error is that the database mydata is not
in the system catalog.

an another error i had after trying to fake postgres is that the oid 12345
dissapeared from pg_database.(i had create a db named mydata  and then copy
the tables and indexes in the directory mydata pgsq pgql create)

do someone know how to copy a db fro one comp to another ?    (i'm under
redhat 7)

thx



Re: postgres

From
Thomas Lockhart
Date:
> do someone know how to copy a db fro one comp to another ?

Yes. You need to use pg_dump or pg_dumpall to extract the data, and then
use psql to restore it. This is a RTFM; check the admin docs and the
reference pages for details.

Good luck.

                   - Thomas

Re: postgres

From
Peter Eisentraut
Date:
mallice writes:

> do someone know how to copy a db fro one comp to another ?    (i'm under
> redhat 7)

Dump it with pg_dump and restore it with psql.  Don't move the individual
files around.  That does not work.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/