On Nov 16, 2005, at 8:45 , <operationsengineer1@yahoo.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:
createdb foo2
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.
Michael Glaesemann
grzm myrealbox com