Have you tried a non redirect? It could be that the "type" command mangles the file (MS software is good at this) pg_restore -Fc -C -U postgres -w -d postgres C:\testdump or even with standard redirect pg_restore -Fc -C -U postgres -w -d postgres < C:\testdump I've had some issues with pg_restore through pgAdmin III where the command passed to the windows shell will just plain not work unless the form of the command is absolutely perfect, it seems that windows doesn't like the form sometimes. M -----Original Message----- From: pgsql-admin-owner@xxxxxxxxxxxxxx [mailto:pgsql-admin-owner@xxxxxxxxxxxxxx] On Behalf Of Kevin Grittner Sent: 29 March 2011 18:41 To: Ravi Thati; pgsql-admin@xxxxxxxxxxxxxx Subject: Re: pg_restore on windows with pipe Ravi Thati <gotothati@xxxxxxxxx> wrote: > type C:\testdump | pg_restore -Fc [...] > pg_restore: [custom archiver] *could not find block ID 1770* in > archive -- possibly corrupt archive > pg_restore: *** aborted because of error Does the type command treat the stream as characters? (You could try putting a ^Z end of file character into a small text file and see how much of it you see if you run type against it.) -Kevin -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin ___________________________________________________ This email is intended for the named recipient. The information contained in it is confidential. You should not copy it for any purposes, nor disclose its contents to any other party. If you received this email in error, please notify the sender immediately via email, and delete it from your computer. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company. PCI Compliancy: Please note, we do not send or wish to receive banking, credit or debit card information by email or any other form of communication. Cromwell Tools Limited, PO Box 14, 65 Chartwell Drive Wigston, Leicester LE18 1AT. Tel 0116 2888000 Registered in England and Wales, Reg No 00986161 VAT GB 115 5713 87 900 __________________________________________________ -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin