I’m writing a cron job to backup a database using pg_dump. I’m looking for a way of redirecting error messages so I can email a backup log file at the end of the process. Is this possible? I can’t see anything in the pg_dump documentation that would support this.
Share
You won’t find any redirection information in the documentation of _any Unnix based tool because not the tool will redirect the output but the shell which executes that tool will do this. So the usual things work for
pg_dumpto:For more possibilities you may lookup the section REDIRECTION of the shell using the command