Re: New DBs from existing schemas

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: New DBs from existing schemas
Date: 2006-05-25 09:22:27
Message-ID: 20060525092227.GI7780@merkur.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 24, 2006 at 04:14:46PM -0700, Nishad Prakash wrote:

> I want to create a new database with the exact schema of an existing one,
> but a different name. After some reading, it seems
>
> pg_dump -s old_db > old_schema
> createdb -t old_schema new_db
Now new_db is a 1:1 copy of old_schema, triggers, data and
all. You may need to setup login permissins in pg_hba for
users to be able to connect to new_db.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Allen 2006-05-25 09:22:45 Re: 8.1 on gentoo
Previous Message Rafal Pietrak 2006-05-25 09:08:27 Re: background triggers?