|
|
HP-UX Reference > Yypxfr(1M)HP-UX 11i Version 2: December 2007 Update |
|
NAMEypxfr, ypxfr_1perday, ypxfr_1perhour, ypxfr_2perday — transfer NIS database from server to local node DESCRIPTIONypxfr copies a Network Information Service (NIS) map (database) to the local host from a NIS server by using the NIS services. A map can be copied regardless of its age, or it can be copied depending on whether its modification time (order number) is more recent than that of the local map. The ypxfr command creates a temporary map in directory /var/yp/domain where domain is the NIS domain. The ypxfr command fills the map with mapname entries, obtains the map parameters (master and order number), and loads them. It then clears the old version of mapname and moves the temporary map to the existing mapname. If ypxfr is run interactively, it writes messages to standard output. If ypxfr is invoked without a controlling terminal and if the log file /var/yp/ypxfr.log exists, ypxfr appends all its messages to that file. Since ypxfr is usually run from root's crontab file (see crontab(1)) or by yppush (see yppush(1M)), the log file can retain a record of what ypxfr attempted and what the results were. To maintain consistency between NIS servers, ypxfr should be executed periodically for every map in the NIS. Different maps change at different rates. For example, the services.byname map may not change for months at a time, and might therefore be checked for changes only once a day, such as in the early morning hours. However, passwd.byname may change several times per day, so hourly checks for updates might be more appropriate. A crontab file can perform these periodic checks and transfers automatically. Rather than having a separate crontab file for each map, ypxfr requests can be grouped in a shell script to update several maps at once. Example scripts (mnemonically named) are in /var/yp: ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour. They serve as reasonable rough drafts that can be changed as appropriate. Refer to ypfiles(4) and ypserv(1M) for an overview of the Network Information Service. Optionsypxfr recognizes the following options and command-line arguments:
|
|