Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2002 01:18:05 -0600
From:      "Mike Loiterman" <mike@ascendency.net>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   cron job
Message-ID:  <001f01c1dc72$0b391f80$0301a8c0@mike>

next in thread | raw e-mail | index | archive | help
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have set up a cron job to do a dump every morning at 5am.  The
first night I had an error in the script.  The dump worked but one of
the other commands I had included in the script, unmounting and
remounting samba shares, had the wrong path.  I was emailed the
output of the dump including the path error.

I subsequently fixed the errors in the mounting and unmounting of the
samba shares, but last night I didn't receive the email I was
previously getting before I fixed the errors that listed the results
of the dump.

The cron entries look like this:
30      5       *       *       0       root   
/usr/local/sbin/fullback
30      5       *       *       1-6     root   
/usr/local/sbin/incbackup

fullback is the same as incback except fullback does a level 0 dump
and incback does a level 9 dump.

incbackup looks like this:
#!/bin/sh

/usr/local/sbin/um
mt rewind
dump 9uaf /dev/nrsa0 /          # backs up the root filesystem
dump 9uaf /dev/nrsa0 /usr       # backs up /usr
dump 9uaf /dev/nrsa0 /var       # backs up /var
/usr/local/sbin/md

um simply unmounts a few samba shares and md remounts them. 
Originally, I just put um and md without the path, which caused
problems.  I put the path in and everything worked, minus the email I
think I'm supposed to get.

My questions are:
1.  If the dump runs normally, shouldn't I receive the output of the
dump via an email sent to root?
2.  If I am supposed to be receiving this email, why aren't I?
3.  If I'm not supposed to receive this email, how can I force the
cron job to email the results to me?

Mike Loiterman
mike@ascendency.net
PGP Key 0xD1B9D18E


-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4
Comment: Message digitally signed by Mike Loiterman

iQA/AwUBPK1PrGjZbUnRudGOEQIHqACeOIK5pieVcPq+RMPlbnKDJ3ToWAcAoKbN
iwY9n15Mwi/rXrXbAnk4i1BA
=19gm
-----END PGP SIGNATURE-----


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001f01c1dc72$0b391f80$0301a8c0>