1YPXFR(8)                     NIS Reference Manual                     YPXFR(8)
2
3
4

NAME

6       ypxfr - transfer NIS database from remote server to local host
7

SYNOPSIS

9       /usr/lib/yp/ypxfr [-f] [-c] [-d target domain] [-h source host]
10                         [-s source domain]
11                         [-C taskid program-number host port] [-p yp_path]
12                         mapname...
13
14

DESCRIPTION

16       ypxfr copies an NIS database from one NIS server to the local host by
17       using the NIS service.  ypxfr is generally invoked by ypinit or by
18       ypserv, when ypserv receives a map transfer request from yppush.  It
19       creates a temporary map in the directory /var/yp/domain (this directory
20       must already exist; domain is the default domainname for the local
21       host), fills it by getting the map's entries and fetches the map
22       parameters (master and order number). If the transfer was successful,
23       the old version of the map will be deleted and the temporary copy will
24       be moved into its place. Then, ypxfr will attempt to send a "clear
25       current map" request to the local ypserv.
26
27       If run interactively, ypxfr writes its output to stderr. However, if it
28       is invoked without a controlling terminal, it will log the output to
29       syslog.
30
31       ypxfr is used primarily in environments where several NIS servers are
32       in use. For all maps, you have a NIS master server, which maintains a
33       canonical copy of the NIS map, and all the other servers, the NIS
34       slaves, copy the new version of the map from the master whenever a
35       update was made. Normally, you have one NIS master for all maps.
36
37       In order to maintain consistency across all NIS servers, ypxfr can be
38       run periodically in a cron job. Maps which change infrequently need
39       only be updated once a day (preferably late at night when system usage
40       is lowest), where those with frequent changes (such as passwd.byname
41       and passwd.byuid ) should be updated perhaps once every hour. Examples
42       are in /usr/lib/yp: ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour.
43       They can serve as reasonable first cuts.
44
45       Normally all updates should be propagated by yppush when
46       /var/yp/Makefile is run on the NIS master server, however it is a good
47       practice on large networks where possible outages could cause NIS
48       slaves to fall out of sync with the master.
49

OPTIONS

51       The following options are supported:
52
53       -f
54           Force a map transfer. Normally, ypxfr will not transfer a map if it
55           determines that the NIS master's copy is not newer than the
56           existing copy already on the local host. This flag forces a
57           transfer regardless of which server's version is more recent.
58
59       -c
60           Do not send a "clear current map" request to the ypserv process
61           running on the local host. This flag is normally used when invoking
62           ypxfr by ypinit or if ypserv is not running locally at the time you
63           are running ypxfr.  Otherwise, ypxfr will complain that it cannot
64           talk to the local ypserv, and the transfer will fail.
65
66       -d domain
67           Specify a domain other than the default NIS domain.
68
69       -h source host
70           Get the map from host, regardless of what the map says the master
71           is. If host is not specified, ypxfr asks the NIS service for the
72           name of the master, and tries to get the map from there. This
73           option is used to insure that ypxfr only copies maps from the NIS
74           master server.
75
76       -s source domain
77           Specify a source domain from which to transfer a map that should be
78           the same across domains.
79
80       -C taskid progam-number host port
81           This option is only for use by ypserv .  When ypserv invokes ypxfr,
82           it specifies that ypxfr should call back a yppush process at the
83           host with IP address or name host, registered as program number
84           progam-number, listening on port port, and waiting for a response
85           to transaction taskid.
86
87       -p yp_path
88           Change the directory for the maps to yp_path/[domainname]/, the
89           default is /var/yp/[domainname].
90
91       mapname
92           One or more names of the map to transfer.
93

FILES

95       /var/yp/[domainname]/[maps]
96

SEE ALSO

98       ypserv(8), yppush(8), ypinit(8), cron(8), crontab(5)
99

AUTHOR

101       Thorsten Kukuk <kukuk@linux-nis.org>
102
103
104
105NIS Reference Manual              07/23/2022                          YPXFR(8)
Impressum