Inside Linux The ypxfr Command The ypxfr command (Web site templates)

Inside Linux The ypxfr Command The ypxfr command is used to transfer an NIS database from a remote server to a local host. The usage for the ypxfr command is as follows: ypxfr [-f] [-c] [-d target domain] [-h source host] [-s source domain] [-C taskid program-number ipaddr port] [-p yp_path ] mapname … The ypxfr command is used to copy an NIS database from an NIS server to the local host. Normally, the ypxfr command is executed by the ypinit command or by the ypserv command when ypserv receives a request from yppush for a map transfer. A temporary map is created in the /var/yp/[domainname] directory. The file is populated with the map entries and retrieves map parameters. The original version of the map is replaced with the temporary map if the transfer succeeded. For all maps, you have an NIS master server, which maintains a canonical copy of the NIS map; all the other servers, the NIS slaves, copy the new version of the map from the master whenever an update is made. Normally, you have one NIS master for all maps. The ypxfr command is used most often where several NIS servers (master and slaves) are in use. The ypxfr command is executed as a cron job. If the data for a map is fairly static, updating once a day should be sufficient. For other highly dynamically changing files, you may want to set cron to run ypxfr every hour or two. The ypxfr command offers a number of options, which are described in Table 11.9. Table 11.9. Options for the ypxfr Command Option Description -f This option forces a map transfer. The ypxfr command will not transfer a map if the copy on the NIS master is the same as the local host. -c This option specifies that the clear current map request should not be sent to ypserv running on the local host. You should use this flag when invoking ypxfr via ypinit. You can also use this flag if ypserv is not running locally. If the option is not specified under either of these two conditions, then ypxfr will complain that it can not communicate to the local ypserv. -d domain This option specifies a domain other than the default. -h source host This option obtains the map from host. If host is not specified, the ypxfr command requests the name of the master from the NIS service, to try to get the map from there. -s source domain This option identifies a source domain to transfer a map from. -C taskid program# ipaddr port This option is used only by the ypserv command. When ypserv executes ypxfr, ypxfr is registered as program#; should call the yppush process at the host with ipaddr; is listening on port; and waiting for a response to taskid. -p yp_path This option changes the directory for the maps to yp_path/[domainname] rather than the default of /var/yp/[domainname]. mapname This option specifies the names of the map(s) to transfer. page 208
We recommend high quality webhost to host and run your jsp application: christian web host services.

Leave a Reply