pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
8.2.4 pg_restore on WinXP and pipes
3+ messages / 2 participants
[nested] [flat]

* 8.2.4 pg_restore on WinXP and pipes
@ 2007-08-22 00:23 David Wall <d.wall@computer.org>
  2007-08-22 00:50 ` Re: 8.2.4 pg_restore on WinXP and pipes Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 3+ messages in thread

From: David Wall @ 2007-08-22 00:23 UTC (permalink / raw)
  To: pgsql-admin

I'm using cygwin on WinXP and upgrading from 8.1 to 8.2.4.

Under 8.1, I ran a full backup and stored that as GZIP file.

Under 8.2, I tried to restore using the command:

gunzip -c backup81.gz | pg_restore -v -O -d mydb

This returned an error:  pg_restore: [archiver] did not find magic 
string in file header

The above commands work fine under Linux/Unix.

What's interesting is that if I just gunzip the file and run it with 
non-pipe input redirection, the same thing works fine (so the data is good):

gunzip backup81.gz
pg_restore -v -O -d mydb < backup81
gzip backup81

It as if the pipe for stdin isn't working, but the other does.  Any 
ideas?  I'd prefer to not have to gunzip and then gzip and use the pipe 
as this is the common script we use on Linux and aside from this 
problem, works well when we run the same scripts under cygwin with WinXP.

Thanks,
David




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: 8.2.4 pg_restore on WinXP and pipes
  2007-08-22 00:23 8.2.4 pg_restore on WinXP and pipes David Wall <d.wall@computer.org>
@ 2007-08-22 00:50 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2007-08-22 01:00   ` Re: 8.2.4 pg_restore on WinXP and pipes David Wall <d.wall@computer.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Kevin Grittner @ 2007-08-22 00:50 UTC (permalink / raw)
  To: d.wall@computer.org; pgsql-admin

>>> On Tue, Aug 21, 2007 at  7:23 PM, in message <46CB81EF.7080403@computer.org>,
David Wall <d.wall@computer.org> wrote: 
> I'm using cygwin on WinXP
> 
> gunzip -c backup81.gz | pg_restore -v -O -d mydb
> 
> This returned an error:  pg_restore: [archiver] did not find magic 
> string in file header
 
Out of curiosity, does it do the same thing for?:
 
gunzip < backup81.gz | pg_restore -v -O -d mydb
 
-Kevin
 





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: 8.2.4 pg_restore on WinXP and pipes
  2007-08-22 00:23 8.2.4 pg_restore on WinXP and pipes David Wall <d.wall@computer.org>
  2007-08-22 00:50 ` Re: 8.2.4 pg_restore on WinXP and pipes Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2007-08-22 01:00   ` David Wall <d.wall@computer.org>
  0 siblings, 0 replies; 3+ messages in thread

From: David Wall @ 2007-08-22 01:00 UTC (permalink / raw)
  To: pgsql-admin

Yes it does the same thing:

$ gunzip < mydb.dump.20070819.gz | pg_restore -v -O -d mydb
pg_restore: [archiver] did not find magic string in file header

Most odd since it seems to work just fine if gunzip first and then use:

pg_restore -v -O -d mydb < mydb.dump.20070819

David



Kevin Grittner wrote:
>>>> On Tue, Aug 21, 2007 at  7:23 PM, in message <46CB81EF.7080403@computer.org>,
>>>>         
> David Wall <d.wall@computer.org> wrote: 
>   
>> I'm using cygwin on WinXP
>>
>> gunzip -c backup81.gz | pg_restore -v -O -d mydb
>>
>> This returned an error:  pg_restore: [archiver] did not find magic 
>> string in file header
>>     
>  
> Out of curiosity, does it do the same thing for?:
>  
> gunzip < backup81.gz | pg_restore -v -O -d mydb
>  
> -Kevin
>  
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>   

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-08-22 01:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-22 00:23 8.2.4 pg_restore on WinXP and pipes David Wall <d.wall@computer.org>
2007-08-22 00:50 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2007-08-22 01:00   ` David Wall <d.wall@computer.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox