Re: pg_restore on windows with pipe

From: "French, Martin" <frenchm(at)cromwell(dot)co(dot)uk>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>, "Ravi Thati" <gotothati(at)gmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_restore on windows with pipe
Date: 2011-03-30 05:47:20
Message-ID: 81976671721DF04B9DCA6ECD87941A402840CB68@roundway.Cromwell-tools.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Kevin Grittner
Sent: 29 March 2011 18:41
To: Ravi Thati; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] pg_restore on windows with pipe

Ravi Thati <gotothati(at)gmail(dot)com> 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(at)postgresql(dot)org)
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
__________________________________________________

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ravi Thati 2011-03-30 06:07:43 Re: pg_restore on windows with pipe
Previous Message Marc Fromm 2011-03-29 17:51:42 odbc