On Nov 16, 2005, at 8:45 , <operationsengineer1(at)yahoo(dot)com> wrote:
> if i can create a db as a copy of an existing db, can
> someone point me to howto or give a quick, fictional
> example how to get this done?
existing db cluster with db foo:
pg_dump foo > foo-dump.sql
new db cluster:
psql -d foo2 -f foo-dump.sql
If you have users and groups that you need to transfer as well,
you'll want to look at pg_dumpall with the -g flag. You may want to
edit the output of pg_dumpall by hand to only get the things you
want. And you'll load the pg_dumpall output into the new db cluster
(with psql) before loading foo-dump.sql.
Take a look at the pg_dump and pg_dumpall docs for more details.
Hope this helps.
grzm myrealbox com
In response to
pgsql-novice by date
|Next:||From: Emiliano Amilcarelli||Date: 2005-11-16 14:09:09|
|Subject: plpython integer types|
|Previous:||From: me||Date: 2005-11-16 00:59:52|
|Subject: 8.1: autovacuum not doing its job?|