On Sat, 12 Apr 2008 00:28:27 +1200
Roger Searle <[EMAIL PROTECTED]> wrote:

> Solved - perhaps somewhat of an anti-climax.  I did follow Volker's 
> method below, unexpectedly all simple scripts creating tgz files worked 
> via cron.  One thing at a time, reverting back to the contents of my 
> original script, I have discovered that the point of failure is 
> including the v switch in the tar command.  Looks cool running from the 
> command line, breaks executing via cron (and not relevant or necessary 
> in that context). 
> 
> So I've learnt quite a lot from all this, in particular some options for 
> useful error logging.  Consequently I now know that a file I have 
> recording various passwords is not being backed up, nor is a credentials 
> file for connecting to a network drive (owned by root, 0400).
> 
> Thanks to everyone for their interest and help with this.
> 
> Cheers,
> Roger
Output from tar is usually emailed to root, but you can redirect in one of 2 
ways:

in the crontab

* * * * * /path/to/cron/job >outfile 2>errfile

of in the bash script

exec > outfile 2>errfile

And the cron job should then work without problem.


-- 
Steve Holdoway <[EMAIL PROTECTED]>

Reply via email to