in reply to Using perl to automate mail backup
I also noticed that you are not checking for many errors. While you are checking for errors, you will never be notified of such errors if this is a daemon job. if the backup is unsuccessful, I would hope that it would at least mail you or add a syslog(). Also, you will never know when the drive is full. If it is full, it should notify you immediately so that it can continue with the backup.
You should quickly check to see if the diskette is the correct one for backup. Perhaps a small file with the title "Email Backup Disk 1" would do the trick.
In short, daemons should definitely be equipped with an emergency mechanism for failure, such as syslog or wall for more important things.
flock: flock does not implement mandatory locking. If your mail spooler doesn't use flock, then you can't either. If your system supports mandatory file locking, then by all means use it- unless it screws with the spooler....but you're just reading files, whether incomplete or not. A ten second suspension of sendmail is probably out of the question :-) the next backup would catch the next round of data....It's apparent to me that this is not incredibly important so your workarounds would be OK...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Using perl to automate mail backup
by zzspectrez (Hermit) on Nov 13, 2000 at 01:36 UTC | |
by AgentM (Curate) on Nov 13, 2000 at 01:40 UTC |