On Tue, 2008-10-14 at 14:59 +0100, Dave Ewart wrote:
> On Tuesday, 14.10.2008 at 14:55 +0100, michael wrote:
> 
> > > I suggest writing/rewriting backup.sh so that it writes its output
> > > to well-defined files, rather than relying on the behaviour of
> > > standard output/error.
> > 
> > I thought about this but presumed if there was an already set-up
> > mechanism for cron jobs that would be preferable. Otherwise I'd also
> > have to sort out how to manage my own logs for backup.sh output (not
> > sure would want them rotated in case I'm away for over a week, say)
> 
> OK: why not rewrite the script to include calls to make the script use
> syslog, then?  Take a look at the package 'logger'.  It works like this:
> 
>   logger -i -p syslog.info -t processname "Message goes here"

that makes sense... I guess I could do something like


#!/bin/bash

(
### usual backup commands
) | logger -i -p syslog.info -t myBackup 


On the other hand, my previous reply says to me I don't want it in logs
but prefer it all in my mbox so could replace the pipe command with "|
mail -s $0 $MyEmail" ;)

thanks, M


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to