YPXFR(NADM) Release 3.2.4 (11/29/90) YPXFR(NADM)
NAME
ypxfr - transfer a NIS map from some NIS server to here
SYNOPSIS
ypxfr [ -f ] [ -h host ] [ -d domain ] [ -c ] [ -C tid prog
ipadd port ] mapname
DESCRIPTION
ypxfr moves a NIS map to the local host by making use of
normal NIS services. It 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 mapname.
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 /usr/adm/nislog exists, it will
append 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 NIS data base. Different
maps change at different rates: for example, the
services.byname map may not change for months at a time and
may therefore be checked only once a day in the wee hours.
Conversely, you may know that mail.aliases or hosts.byname
may change several times per day. In such a case, you may
want to check for updates on an hourly basis. A crontab(C)
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 in a shell
script. Examples (mnemonically named) are in /etc/yp:
ypxfr1pdy, ypxfr2pdy, and ypxfr1phr. They can serve as
reasonable first cuts.
Note: Only abbreviated mapnames less than 10 characters long
may be used. This is due to restrictions which involve the
local System V file system. See ypmapxlate(NF) for more
details.
Refer to ypfiles(NF) and ypserv(NADM) for an overview of the
network information service.
After transfering a map, ypxfr checks for the existence of a
file with the same name as the map in the directory
/etc/yp/map2ascii. If such a file exists, it is run by
forking a shell to execute it. These files must be shell
scripts. They are intended to convert the contents of the
Page 1 (printed 7/1/91)
YPXFR(NADM) Release 3.2.4 (11/29/90) YPXFR(NADM)
map with the same name to an ascii file in the proper place,
usually /etc. An example of this is the passwd.nam script
which is used to convert the contents of the passwd.byname
map to a flat ascii file which is installed as /etc/passwd.
Thus, the utilities on a system may be able to utilize
network-wide files such as the passwd or host files without
being modified or recompiled to use the NIS versions of the
passwd file or host table access routines. See
map2ascii(NADM) for more details on this.
OPTIONS
-f Force the transfer to occur even if the version at
the master is not more recent than the local
version.
-c Do not 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, ypxfr will complain that it
cannot talk to the local ypserv and the transfer
will fail.
-h host Get the map from host, regardless of what the map
says the master is. If host is not specified,
ypxfr will ask the NIS service for the name of the
master and then try 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 address ipaddr, registered as program number
prog, listening on port port, and waiting for a
response to transaction tid.
FILES
/usr/adm/nislog, /etc/yp/ypxfr1pdy, /etc/yp/ypxfr2pdy,
/etc/yp/ypxfr1phr, /etc/yp/YP_MAP_X_LATE, /usr/lib/crontab
SEE ALSO
ypfiles(NF), ypserv(NADM), yppush(NADM), ypmapxlate(NF),
map2ascii(NADM)
"NIS Protocol Specification" in the NFS User's Guide
Page 2 (printed 7/1/91)