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

From Raymond O'Donnell
Subject Re: restore a dump db from tar file
Date
Msg-id 48E9FF65.1030702@iol.ie
Whole thread Raw
In response to restore a dump db from tar file  ("Alain Roger" <raf.news@gmail.com>)
Responses Re: restore a dump db from tar file  ("Alain Roger" <raf.news@gmail.com>)
List pgsql-general
On 06/10/2008 09:07, Alain Roger wrote:

> i backup my database "sewe" using a standard process.
> 1. it backups only database and not roles :-( roles are backuped separately.
> 2. backup is a tar file
> 3. backup command is : pg_dump -v -o -U myuser -ci -Ft -f sewe.tar sewe
>
> Question
> how can i restore it now ?
> could something like that could work on Windows XP ?
> createdb sewe
> gunzip -c sewe.tar | psql sewe

AAIU, the custom dump formats are less portable than the plain-text
format, so you might be better off using that. In that case, you need to
unzip the file first and then restore it using psql.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: restore a dump db from tar file
Next
From: Tom Lane
Date:
Subject: Re: Looping through cursor row batches