Re: restore a dump db from tar file - Mailing list pgsql-general

From Scott Marlowe
Subject Re: restore a dump db from tar file
Date
Msg-id dcc563d10810060911g4c9cebb0s297638c16217f46b@mail.gmail.com
Whole thread Raw
In response to Re: restore a dump db from tar file  ("Alain Roger" <raf.news@gmail.com>)
List pgsql-general
On Mon, Oct 6, 2008 at 9:12 AM, Alain Roger <raf.news@gmail.com> 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.

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Re: [Pkg-postgresql-public] Postgres major version support policy on Debian
Next
From: Raymond O'Donnell
Date:
Subject: Re: restore a dump db from tar file