YPXFR(8) COMMAND REFERENCE YPXFR(8) NAME ypxfr, ypxfr_1perday, ypxfr_1perhour, ypxfr_2perday - transfer a YP map SYNOPSIS /usr/etc/yp/ypxfr [ -f ] [ -h host ] [ -d domain ] [ -c ] [ -C tid prog ipadd port ] mapname DESCRIPTION The command ypxfr moves a YP (Yellow Pages) map to the local host by making use of normal YP services; ypxfr creates a temporary map in the directory /etc/yp/domain (which must already exist), fills it by enumerating the map's entries, fetches the map parameters (master and order number), and loads them. It then deletes any old versions of the map and moves the temporary map to the real map name. If ypxfr is run interactively, it writes its output to the terminal. However, if it is invoked without a controlling terminal, and if the log file /etc/yp/ypxfr.log exists, ypxfr appends all its output to that file. Since ypxfr is most often run from /usr/lib/crontab, or by ypserv, you can use the log file to retain a record of what was attempted, and what the results were. For consistency between servers, ypxfr should be run periodically for every map in the YP data base. Different maps change at different rates: the services.byname map may not change for months at a time, for instance, and may therefore be checked only once a day. You may know that mail.aliases or hosts.byname change several times per day; in such a case, you may want to check hourly for updates. A cron(8) entry can be used to perform periodic updates automatically. Rather than having a separate crontab entry for each map, you can group commands to update several maps using a shell script; examples (mnemonically named) are in the /etc/yp file: ypxfr_1perday.sh, ypxfr_2perday.sh, and ypxfr_1perhour.sh. Refer to ypfiles(5) and ypserv(8) for an overview of the Yellow Pages. OPTIONS -f Force the transfer to occur even if the version at the master is not more recent than the local version. -c Don't send a Clear current map request to the local ypserv process; use this flag if ypserv is not running locally at the time you are running ypxfr. Otherwise, Printed 4/6/89 1
YPXFR(8) COMMAND REFERENCE YPXFR(8) ypxfr complains that it can't talk to the local ypserv, and the transfer fails. -h host Get the map from host, regardless of what the map says the master is. If host is not specified, ypxfr asks the YP service for the name of the master, and tries to get the map from there; host may be a name or an internet address in the form a.b.c.d. -d domain Specify a domain other than the default domain. -C tid prog ipadd port This option is only for use by ypserv. When ypserv invokes ypxfr, it specifies that ypxfr should call back a yppush process at the host with IP (Internet Protocol) address ipaddr, registered as program number prog, listening on port port, and waiting for a response to transaction tid. FILES /etc/yp/ypxfr.log log file /etc/yp/ypxfr_1perday script runs one transfer per day, for use with cron(8) /etc/yp/ypxfr_2perday script runs two transfers per day /etc/yp/ypxfr_1perhour script for hourly transfers of volatile maps SEE ALSO ypfiles(5), cron(8), ypserv(8), and yppush(8). YP Protocol Specification in Networking on the SUN Workstation document. Printed 4/6/89 2
%%index%% na:264,128; sy:392,529; de:921,2445; op:3366,700;4402,1755; fi:6157,523; se:6680,383; %%index%%000000000119