8.2.4 pg_restore on WinXP and pipes

From: David Wall <d(dot)wall(at)computer(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: 8.2.4 pg_restore on WinXP and pipes
Date: 2007-08-22 00:23:11
Message-ID: 46CB81EF.7080403@computer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tena Sakai 2007-08-22 00:28:48 tar, but not gnu tar
Previous Message Medi Montaseri 2007-08-21 23:59:26 Re: ROI on 7.2 to 8.2