copies an NIS database from one NIS server to the local host by
using the NIS service.
is generally invoked by
receives a map transfer request from
It creates a temporary map in the directory
(this directory must already exist;
is the default domainname for the local host), fills it by getting
the map's entries and fetches the map parameters (master and order number).
If the transfer was successful, the old version of the map will be
deleted and the temporary copy will be moved into its place.
will attempt to send a "clear current map" request to the local
If run interactively,
writes its output to stderr.
However, if it is invoked without a controlling terminal, it will
log the output to syslog.
is used primarily in environments where several NIS servers are in use.
For all maps, you have a NIS master server, which maintains a canonical
copy of the NIS map, and all the other servers, the NIS slaves, copy
the new version of the map from the master whenever a update was made.
Normally, you have one NIS master for all maps.
In order to maintain consistency across all NIS servers,
can be run periodically in a
job. Maps which change infrequently need only be updated once a day
(preferably late at night when system usage is lowest), where those
with frequent changes (such as
should be updated perhaps once every hour.
Examples are in
/usr/lib/yp: ypxfr_1perday, ypxfr_2perday,
They can serve as reasonable first cuts.
Normally all updates should be propagated by
is run on the NIS master server, however it is a good practice
on large networks where possible outages could cause NIS slaves to
fall out of sync with the master.
The following options are supported:
Force a map transfer. Normally,
will not transfer a map if it determines that the NIS master's copy
is not newer than the existing copy already on the local host. This
flag forces a transfer regardless of which server's version is more
Do not send a "clear current map" request to the
process running on the local host. This flag is normally used when
is not running locally at the time you are running
will complain that it cannot talk to the local
and the transfer will fail.
Specify a domain other than the default NIS domain.
-h source host
Get the map from
regardless of what the map says the master is. If
is not specified,
service for the name of the master, and tries to get the
map from there. This option is used to insure that ypxfr only copies
maps from the NIS master server.
-s source domain
Specify a source domain from which to transfer a map that should be the same
-C taskid progam-number ipaddr port
This option is
for use by
it specifies that
should call back a
process at the host with
registered as program number
listening on port
and waiting for a response to transaction
Change the directory for the maps to
yp_path/[domainname]/, the default