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

From Alain Roger
Subject Re: restore a dump db from tar file
Date
Msg-id 75645bbb0810060603w23480957mf51fd2c901288903@mail.gmail.com
Whole thread Raw
In response to Re: restore a dump db from tar file  (Raymond O'Donnell <rod@iol.ie>)
Responses Re: restore a dump db from tar file  (Raymond O'Donnell <rod@iol.ie>)
List pgsql-general
this is basically what i use but it does not work.
pg_restore -C -d sewe survey.tar -U postgres

but i get the following error message:
pg_restore: [archiver (db)] connection to database "sewe" failed: FATAL:  passwo
rd authentication failed for user "raf_new"

where raf_new is my computer user and not user i used in my pg_restore :-(

On Mon, Oct 6, 2008 at 2:07 PM, Raymond O'Donnell <rod@iol.ie> wrote:
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
------------------------------------------------------------------



--
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Looping through cursor row batches
Next
From: Raymond O'Donnell
Date:
Subject: Re: restore a dump db from tar file