Search Postgresql Archives

Re: New DBs from existing schemas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux