I have a shell script on one debian system here to back up certain
portions of the filesystem. It simply tars up the directories and
moves the tar file to a samba share which is backed up by some already
in-place windows software.
The problem is that mv is too noisy :
mv: failed to preserve ownership for `/mnt/red1/Builds/cvsbackup/CVS-Backup-2004-01-21.tar.gz': Operation not permitted
This is a problem because I then become conditioned to ignore emails
from cron assuming they only contain this non-problem. However,
sometimes there is a real problem and I need to know about it.
Therefore, I want this particular error message to not be reported,
however I want other errors (for example No space left on device) to
go to stderr. When this script is run, stdout is sent to a log file
and stderr (if any) is sent to me via mail.
Any suggestions?
Hmm, I suppose I could code the logging in the script itself rather
than using shell redirection in the cron job and then let errors just
go to stdout.
-D
--
"...In the UNIX world, people tend to interpret `non-technical user' as
meaning someone who's only ever written one device driver."
--Daniel Pead
www: http://dman13.dyndns.org/~dman/ jabber: dman@dman13.dyndns.org
Attachment:
signature.asc
Description: Digital signature