Thread: pg_dump "what if?"

pg_dump "what if?"

From
Peter Lang
Date:
Hi,

I'm running pg_dump 7.3.4.  I have a nightly process that dumps a database
via pg_dump, and then checks for the existence of the dumped file afterwards
to confirm that the dump actually occurred.  Just wondering, however, if a
corrupt disk prevented pg_dump from executing fully, would there still be an
output file up to the point where the corruption was encountered?  If so,
does anyone have any suggestions on another method to confirm whether or not
the db was successfully dumped?

BTW I'm running under Win2k using Cygwin.

Thanks in advance,
Peter


Re: pg_dump "what if?"

From
Steve Crawford
Date:
On Wednesday 24 March 2004 10:59 am, Peter Lang wrote:
> I'm running pg_dump 7.3.4...<snip>...does anyone
> have any suggestions on another method to confirm whether or not
> the db was successfully dumped?
>
> BTW I'm running under Win2k using Cygwin.

Normally you can check the exit status of the command. In bash you
might use:
pg_dump.....
if [ $? -ne 0 ]
then
  # report the error
fi

Don't know if there are any problems getting the exit status in
cygwin, though.

Cheers,
Steve