copy db1 to db2

Started by Bobby Gontarskiover 19 years ago4 messagesgeneral
Jump to latest
#1Bobby Gontarski
Gontarski@seznam.cz

Basically I need to copy db1 to db2 which I create manually. How do I do that, I tried pg_dump pg_restore but I get some errors with foreign key restraint...

#2Noname
Matthias.Pitzl@izb.de
In reply to: Bobby Gontarski (#1)
Re: copy db1 to db2

What kind of errors? Just saying "i got some errors" isn't very helpfull for
us to be able to help you properly ;)
So, what exact error messages you get when trying to restore the database?

-- Matthias

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of
Bobby Gontarski
Sent: Sunday, September 24, 2006 5:21 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] copy db1 to db2

Basically I need to copy db1 to db2 which I create manually.
How do I do that, I tried pg_dump pg_restore but I get some
errors with foreign key restraint...

---------------------------(end of
broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

#3Bill Moran
wmoran@collaborativefusion.com
In reply to: Bobby Gontarski (#1)
Re: copy db1 to db2

In response to "Bobby Gontarski" <Gontarski@seznam.cz>:

Basically I need to copy db1 to db2 which I create manually. How do I
do that, I tried pg_dump pg_restore but I get some errors with foreign
key restraint...

You can use create database with db1 as the template. See the docs for
details.

--
Bill Moran
Collaborative Fusion Inc.

#4Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Bill Moran (#3)
Re: copy db1 to db2

On Sep 25, 2006, at 9:49 AM, Bill Moran wrote:

In response to "Bobby Gontarski" <Gontarski@seznam.cz>:

Basically I need to copy db1 to db2 which I create manually. How do I
do that, I tried pg_dump pg_restore but I get some errors with
foreign
key restraint...

You can use create database with db1 as the template. See the docs
for
details.

But if you're getting foreign key constraint errors, you probably
have some other issue that you should figure out.

What version is this anyway?
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)