Re: Capturing output of vacuumdb and pg_dump - Mailing list pgsql-admin

From Tom Lane
Subject Re: Capturing output of vacuumdb and pg_dump
Date
Msg-id 18873.1050168357@sss.pgh.pa.us
Whole thread Raw
In response to Capturing output of vacuumdb and pg_dump  ("Matt Mello" <alien@spaceship.com>)
List pgsql-admin
"Matt Mello" <alien@spaceship.com> writes:
> I am a linux shell [bash/sh] newbie.  I want to capture the output of the
> vacuumdb and pg_dump commands to a log file.  I want all of the lines that
> are normally displayed on the screen to be *appended* to a single log file
> that I can inspect offline at my convenience.  I have discovered that
> ">>logfile" won't get all of the data.  Can someone point me to an example
> of how to do that?

You're missing stderr.  On sh/bash type shells you want

    foo >>logfile 2>&1

There is some other locution on csh and its descendants, but I forget
what.

            regards, tom lane


pgsql-admin by date:

Previous
From: "Matt Mello"
Date:
Subject: Capturing output of vacuumdb and pg_dump
Next
From: "Matt Mello"
Date:
Subject: When is postmaster ready?