4.3BSD-UWisc/man/cat8/ypxfr.8
YPXFR(8) UNIX Programmer's Manual YPXFR(8)
NAME
ypxfr - transfer a YP map from some YP server to here
SYNOPSIS
ypxfr [ -f ] [ -h _h_o_s_t ] [ -d _d_o_m_a_i_n ] [ -c ] [ -C _t_i_d _p_r_o_g
_i_p_a_d_d _p_o_r_t ] _m_a_p_n_a_m_e
DESCRIPTION
_y_p_x_f_r moves a YP map to the local host by making use of nor-
mal YP services. It creates a temporary map in the direc-
tory /_e_t_c/_y_p/_d_o_m_a_i_n (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 mapname.
If _y_p_x_f_r is run interactively, it writes its output to the
terminal. However, if it's invoked without a controlling
terminal, and if the log file /_e_t_c/_y_p/_y_p_x_f_r._l_o_g exists, it
will append all its output to that file. Since _y_p_x_f_r is
most often run from /_u_s_r/_l_i_b/_c_r_o_n_t_a_b , or by _y_p_s_e_r_v , you
can use the log file to retain a record of what was
attempted, and what the results were.
For consistency between servers, _y_p_x_f_r should be run period-
ically for every map in the YP data base. Different maps
change at different rates: the _s_e_r_v_i_c_e_s._b_y_n_a_m_e map may not
change for months at a time, for instance, and may therefore
be checked only once a day in the wee hours. You may know
that _m_a_i_l._a_l_i_a_s_e_s or _h_o_s_t_s._b_y_n_a_m_e changes several times per
day. In such a case, you may want to check hourly for
updates. A _c_r_o_n_t_a_b(5) entry can be used to perform
periodic updates automatically. Rather than having a
separate _c_r_o_n_t_a_b entry for each map, you can group comands
to update several maps in a shell script. Examples (mnemon-
ically named) are in /_e_t_c/_y_p: _y_p_x_f_r__1_p_e_r_d_a_y._s_h,
_y_p_x_f_r__2_p_e_r_d_a_y._s_h, and _y_p_x_f_r__1_p_e_r_h_o_u_r._s_h. They can serve as
reasonable first cuts.
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 ver-
sion.
-c Don't send a "Clear current map" request to the
local _y_p_s_e_r_v process. Use this flag if _y_p_s_e_r_v is
not running locally at the time you are running
_y_p_x_f_r. Otherwise, _y_p_x_f_r will complain that it
can't talk to the local _y_p_s_e_r_v, and the transfer
Printed 12/27/86 1 Aug 1985 1
YPXFR(8) UNIX Programmer's Manual YPXFR(8)
will fail.
-h _h_o_s_t Get the map from _h_o_s_t , regardless of what the map
says the master is. If _h_o_s_t is not specified,
_y_p_x_f_r will ask the YP service for the name of the
master, and try to get the map from there. _h_o_s_t
may be a name or an internet address in the form
_a._b._c._d .
-d _d_o_m_a_i_n Specify a domain other than the default domain.
-C _t_i_d _p_r_o_g _i_p_a_d_d _p_o_r_t
This option is only for use by _y_p_s_e_r_v. When
_y_p_s_e_r_v invokes _y_p_x_f_r, it specifies that _y_p_x_f_r
should call back a _y_p_p_u_s_h process at the host with
IP address _i_p_a_d_d_r , registered as program number
_p_r_o_g , listening on port _p_o_r_t , and waiting for a
response to transaction _t_i_d .
FILES
/etc/yp/ypxfr.log, /etc/yp/ypxfr_1perday.sh,
/etc/yp/ypxfr_2perday.sh, /etc/yp/ypxfr_1perhour.sh,
/usr/lib/crontab
SEE ALSO
ypfiles(5), ypserv(8), yppush(8), YP protocol spec
Printed 12/27/86 1 Aug 1985 2