2 .\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by Bill Paul.
15 .\" 4. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" $FreeBSD: src/libexec/ypxfr/ypxfr.8,v 1.10.2.4 2002/12/29 16:35:37 schweikh Exp $
38 .Nd "transfer NIS database from remote server to local host"
40 .Nm /usr/libexec/ypxfr
43 .Op Fl d Ar target domain
44 .Op Fl h Ar source host
45 .Op Fl s Ar source domain
47 .Op Fl C Ar taskid program-number ipaddr port
57 server to another using
62 is generally invoked by
64 when it receives a map transfer request from
67 is used primarily in environments where several
69 servers are in use in a single domain. One server, the
72 the canonical copies of all
74 maps, and all the other servers,
77 slaves, copy new versions of the maps from the master whenever
78 any updates are made (i.e. when a user updates their password via
83 creates a temporary database file in
84 .Pa /var/yp/[domainname] ,
85 and fills it with the contents of
87 as supplied by the specified
89 When the entire map has been transferred,
91 deletes the original copy of
93 and moves the temporary copy into its place. When the transfer is
96 will attempt to send a 'clear current map' request to the local
98 process to clear any possible references it may still have to the
101 Note that all files created by
103 are owner readable and writable only for security reasons. Since the
105 maps and the directory in which they reside are normally owned by
106 root, this prevents non-privileged users from making unauthorized
109 In order to maintain consistency across all
113 can be run periodically in a
115 job. Maps which change infrequently
116 need only be updated once a day (preferably late at night when system
117 usage is lowest), whereas those that are subject to frequent changes
122 should be updated perhaps once every hour. Using
127 maps is not strictly mandatory since all updates should
134 master server, however it is good practice
135 on large networks where possible outages could cause
137 servers to fall out of sync with each other.
141 is invoked without a controlling terminal, e.g. from inside
143 it logs all its output using the
151 has support for a special map transfer protocol which works in
155 server. This protocol allows it to transfer raw map database files from
158 master server and can be many times faster than the standard
159 transfer method, particularly for very large
163 command will check to see if the
165 server is registered on the
167 master server and attempt to use
168 it if it is present. If it isn't it will fall back to the standard
169 transfer method, copying the map contents from
171 and creating new maps instead.
175 ypxfrd protocol is conceptually similar
176 to the SunOS ypxfrd protocol,
179 protocol is not compatible with
180 Sun's, therefore it will not work with Sun's ypxfrd server.
182 slave systems can still transfer maps from any
183 .No non- Ns Dx Ns / Ns Fx
186 however they will only be able to take advantage of the faster protocol
187 if the master server is also running
190 The following options and flags are supported by
192 .Bl -tag -width indent
194 Force a map transfer. Normally,
196 will not transfer a map if it determines that the
199 is not newer than the existing copy already on the local host: the
201 flag forces a transfer regardless of which server's version is more recent.
203 Do not send a 'clear current map' request to the
205 process running on the local host. This flag is normally used when
208 manually on a machine that is not yet running
210 Without this flag, failure to contact the local
214 to abort the transfer.
215 .It Fl d Ar target domain
216 Specify a target domain other than the current
219 .It Fl h Ar source host
220 Specify the name of the host from which to copy the
223 is used to insure that
225 only copies maps from the
228 .It Fl s Ar source domain
229 Specify the domain from which to transfer a map, in the event that
230 the transfer is being done across two different
234 Specify the top level directory containing the
237 default, this path is
241 flag allows you to specify an alternate path should you wish to
244 maps in a different part of the filesystem. The
250 if it too has been told to use an alternate path.
251 .It Fl C Ar taskid program-number ipaddr port
252 These options are used only when
256 in response to a map transfer request initiated by
260 needs to 'callback' to the
262 process and interact with it, so
264 passes to it an IP address
268 registered program number
272 that it can use to contact the waiting
274 process on the master server.
276 The name of the map to transfer.
279 .Bl -tag -width Pa -compact
280 .It Pa /var/yp/[domainname]/[maps]
283 maps for a particular
292 .An Bill Paul Aq Mt wpaul@ctr.columbia.edu