You could also try tweaking the following attached backup script.
Caution, I wrote this quickly from a skeleton script and has not been
tested.

On Mon, Nov 23, 2015 at 3:21 PM, Tom Lane <[email protected]> wrote:

> anj patnaik <[email protected]> writes:
> > My cron tab entry:
>
> > 0 20 * * * db_backup.sh 1> /dev/null 2>&1 | mail -s "backup cron"
> > [email protected]
>
> > I am re-directing stderr to stdout and then sending that to email.
>
> Uh, read it again: you're redirecting stdout to /dev/null and then
> redirecting stderr to go where stdout goes.  So all output is
> going to the bit bucket, not the pipe.
>
>                         regards, tom lane
>
>
> --
> Sent via pgsql-general mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Attachment: make_backup.sh
Description: Bourne shell script

-- 
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to