NFS Services Administrator's Guide

Configuring and Administering NIS
Configuring and Administering an NIS Slave Server
Chapter 4 179
To Schedule Regular Map Transfers from the NIS
Master Server
1. Log in as root to the slave server.
2. Copy the ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour
scripts from the /usr/newconfig/var/yp directory to the /var/yp
directory:
cp /usr/newconfig/var/yp/ypxfr_1perday /var/yp
cp /usr/newconfig/var/yp/ypxfr_2perday /var/yp
cp /usr/newconfig/var/yp/ypxfr_1perhour /var/yp
3. Create a crontab file that invokes these files at regular times.
Following is an example crontab file:
0 21 * * * /var/yp/ypxfr_1perday
30 5,19 * * * /var/yp/ypxfr_2perday
15 * * * * /var/yp/ypxfr_1perhour
This file runs the ypxfr_1perday script at 9:00 PM every night. It
runs the ypxfr_2perday script at 5:30 AM and 7:30 PM every day. It
runs the ypxfr_1perhour at 15 minutes past every hour.
4. Issue the following command to enter the file into crontab,
crontab filename
where filename is the crontab file you just created.
If you have created customized NIS maps for your domain, you will have
to add them to the appropriate scripts. You can also use the scripts
provided as templates for creating your own scripts.
In some domains, transferring the passwd maps once per hour generates
too much network traffic. If you find this is the case, schedule transfers of
the passwd maps for less frequent intervals.
If you have multiple slave servers, schedule map transfers for different
times on different servers, so all the servers are not performing transfers
at the same time.
For more information, see the following man pages: cron(1M),
crontab(1), and ypxfr(1M).