ypxfr (8) Linux Manual Page
ypxfr – transfer NIS database from remote server to local host
Synopsis
-
/usr/lib/yp/ypxfr[-f] [-c] [-dtarget domain] [-h source host] [-s source domain] [-C taskid program-number ipaddr port] [-p yp_path] mapname… Description
ypxfr- copies an NIS database from one NIS server to the local host by using the NIS service.
ypxfris generally invoked byypinitor byypserv,whenypservreceives a map transfer request fromyppush.It creates a temporary map in the directory FC/var/yp/domainF[] (this directory must already exist; domain 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. Then,ypxfrwill attempt to send a "clear current map" request to the localypserv.If run interactively,
ypxfrwrites its output to stderr. However, if it is invoked without a controlling terminal, it will log the output to syslog.ypxfris 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,
ypxfrcan be run periodically in acronjob. 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 passwd.byname and passwd.byuid ) should be updated perhaps once every hour. Examples are in FC/usr/lib/yp: ypxfr_1perday, ypxfr_2perday,F[] andypxfr_1perhour.They can serve as reasonable first cuts.Normally all updates should be propagated by
yppushwhen FC/var/yp/MakefileF[] 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.Options
The following options are supported:
-f- Force a map transfer. Normally,
ypxfrwill 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 recent.
-c- Do not send a "clear current map" request to the
ypservprocess running on the local host. This flag is normally used when invokingypxfrbyypinitor ifypservis not running locally at the time you are runningypxfr.Otherwise,ypxfrwill complain that it cannot talk to the localypserv,and the transfer will fail.
-ddomain- Specify a domain other than the default NIS domain.
-hsource host- Get the map from host, regardless of what the map says the master is. If host is not specified,
ypxfrasks the NIS 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.
-ssource domain- Specify a source domain from which to transfer a map that should be the same across domains.
-Ctaskid progam-number ipaddr port- This option is
onlyfor use byypserv .Whenypservinvokesypxfr, it specifies thatypxfrshould call back ayppushprocess at the host with IP address ipaddr, registered as program number progam-number, listening on port port, and waiting for a response to transaction taskid.
-pyp_path- Change the directory for the maps to yp_path/[domainname]/, the default is FC/var/yp/[domainname]F[].
mapname
- One or more names of the map to transfer.
Files
/var/yp/[domainname]/[maps]
See Also
ypserv(8),yppush(8),ypinit(8),cron(8),crontab(5)Author
Thorsten Kukuk <kukuk [at] linux-nis.org>
