On Mon, Oct 6, 2008 at 9:12 AM, Alain Roger <raf.news@xxxxxxxxx> wrote: > > AFAIK, pg_dump -v -o -U username -ci -Ft -f tarname.tar dbname > backup the DB but without inserting code to create the BD itself... just to > create its structure and populate it. > noting about create database dbname > grant. ... > > how can i do that automatically ? > i mean when i dump my db, how can i dump ALSO the script to create the BD > and its property ? pg_dumpall produces such output. You could do a schema only pg_dumpall and grep out the parts you need for that one db.