CheckNBack is designed to execute from cron. You should always submit the CheckNBack job as root. This prevents any problem with file permissions. It also guarantees the job will execute on any system. Only root can submit a cron job if cron.deny or cron.allow do not exist in the crontab directory. Also, do not submit the cron job by editing the crontab file manually. Manual changes to the crontab do not take effect until reboot. Many UNIX systems are not rebooted often. Submit your backup with crontab -e. This submits it immediately. Add "15 0 * * * CheckNBack" to the root crontab. This will run the backup every morning at 12:15 A.M. Note that ForgetMeNot requires the nightly backup to always finish the next day, so on most systems, you should start the backup right after midnight .
Installation
You should create a directory to store the CheckNBack and ForgetMeNot files. Any directory will do. There are three stock email templates that are mailed to the supervisor in the event of a problem: noread.txt, numdiff.txt, and tchange.txt. noread.txt is sent if CheckNBack cannot read the archive it created. numdiff.txt is sent if the number of archived files are different from the current number of files in the data directory. tchange.txt is sent when the operator has not changed the tape from the day before. Customize these messages to suite your needs.
The configuration file is CheckNBack.cfg (see Listing 3). It can be stored in /etc/default, the CheckNBack work directory, or any other directory you select. Set the variable, configdir, to your choice in both scripts. CheckNBack.cfg holds the configuration information for both CheckNBack and ForgetMeNot. The variable, GNU, indicates whether the system is a GNU system that can generate compressed tar archives. The option, NOCHECK, is used to prohibit ForgetMeNot from checking on a particular weekday. If the backup fails, the NOLOGIN parameter prevents the user from logging into the system. Naturally, this feature is disabled for the root account. BACKUPDIR is the top data directory. The destination device is stored in BACKUPDEVICE. You may disable both CheckNBack and ForgetMeNot by setting the DISABLE variable to YES. The work directory for both scripts is contained in CBDIR. If you wish to display the system date and time when your user logs into the system, set VERIFYDATE to YES. Email is sent to the designated backup supervisor indicated with BACKMGR. This should not be the operator, but the operator's supervisor.
Every user's .profile should be modified to execute ForgetMeNot. The lines that must be added to the user's .profile are:
ForgetMeNot if [ ! ?# -eq 4 ] then echo "Login not allowed." exit fi
The script files, CheckNBack and ForgetMeNot, can be located in the work directory or placed in /bin or /usr/bin. CheckNBack.man and ForgetMeNot.man should be loaded into the local man page directory.
Conclusion
CheckNBack and ForgetMeNot have limitations: it does not perform system backups; the archive is not byte-by-byte verified; device files are not archived; and CheckNBack only supports compression on a GNU system. However, used together they can be useful tools. Let's not take anymore of the dreaded gone-because-it-was-forgotten phone calls from users.
Don is president of Quality Software Solutions, Inc. He is the author of TimeClock, TimeClock Lyte, DbDelta, and the Property Presentation System. He can be reached via email at dbryson@tclock.com.
Don is president of Quality Software Solutions, Inc. He is the author of TimeClock, TimeClock Lyte, DbDelta, and the Property Presentation System. He can be reached via email at dbryson@tclock.com.
© 2002 CMP Media LLC. All Rights Reserved. |