Re: restore a dump db from tar file

From: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
To: rod(at)iol(dot)ie
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: restore a dump db from tar file
Date: 2008-10-06 15:12:41
Message-ID: 75645bbb0810060812x5c956781o47def77bb89111ea@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Oct 6, 2008 at 3:12 PM, Raymond O'Donnell <rod(at)iol(dot)ie> wrote:

> On 06/10/2008 14:03, Alain Roger wrote:
> > this is basically what i use but it does not work.
> >
> > pg_restore -C -d sewe survey.tar -U postgres
>
> Just a guess, since I haven't used pg_restore - a quick look at the docs
> suggests that the filename should come *last* on the command line, so
> try that.
>
> Ray.
>
> ------------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod(at)iol(dot)ie
> Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
> ------------------------------------------------------------------
>

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 ?
thx.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ries van Twisk 2008-10-06 15:16:04 Re: Frustrated...pg_dump/restore
Previous Message Scott Marlowe 2008-10-06 15:11:14 Re: Frustrated...pg_dump/restore