6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / ypxfr.1m
blob42e41ac6a77011f1e5013a3e61250d408b3cc0c4
1 '\" te
2 .\" Copyright (c) 2000 Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH YPXFR 1M "Mar 11, 1998"
8 .SH NAME
9 ypxfr, ypxfr_1perday, ypxfr_1perhour, ypxfr_2perday \- transfer NIS map from a
10 NIS server to host
11 .SH SYNOPSIS
12 .LP
13 .nf
14 \fB/usr/lib/netsvc/yp/ypxfr\fR [\fB-c\fR] [\fB-f\fR] [\fB-C\fR \fItid\fR \fIprog\fR \fIserver\fR]
15      [\fB-d\fR \fIypdomain\fR] [\fB-h\fR \fIhost\fR] [\fB-s\fR \fIypdomain\fR] \fImapname\fR
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 The \fBypxfr\fR command moves an \fBNIS\fR map in the default domain for the
22 local host to the local host by making use of normal \fBNIS\fR services. It
23 creates a temporary map in the directory \fB/var/yp/\fR\fIypdomain\fR (this
24 directory must already exist; \fIypdomain\fR is the default domain for the
25 local host), fills it by enumerating the map's entries, fetches the map
26 parameters (master and order number), and loads them. It then deletes any old
27 versions of the map and moves the temporary map to the real \fIname\fR.
28 .sp
29 .LP
30 If run interactively, \fBypxfr\fR writes its output to the terminal. However,
31 if it is started without a controlling terminal, and if the log file
32 \fB/var/yp/ypxfr.log\fR exists, it appends all its output to that file. Since
33 \fBypxfr\fR is most often run from the privileged user's \fBcrontab\fR file, or
34 by \fBypserv\fR, the log file can retain a record of what was attempted, and
35 what the results were.
36 .sp
37 .LP
38 For consistency between servers, \fBypxfr\fR should be run periodically for
39 every map in the \fBNIS\fR data base. Different maps change at different rates:
40 a map might not change for months at a time, for instance, and can therefore be
41 checked only once a day. Some maps might change several times per day. In such
42 a case, you might want to check hourly for updates. A \fBcrontab\fR(1) entry
43 can be used to automatically perform periodic updates. Rather than having a
44 separate \fBcrontab\fR entry for each map, you can group commands to update
45 several maps in a shell script. Examples (mnemonically named) are in
46 \fB/usr/sbin/yp\fR: \fBypxfr_1perday\fR, \fBypxfr_2perday\fR, and
47 \fBypxfr_1perhour\fR.
48 .sp
49 .LP
50 Refer to \fBypfiles\fR(4) for an overview of the NIS name service.
51 .SH OPTIONS
52 .sp
53 .ne 2
54 .na
55 \fB\fB-c\fR\fR
56 .ad
57 .RS 22n
58 Do not send a "Clear current map" request to the local \fBypserv\fR process.
59 Use this flag if \fBypserv\fR is not running locally at the time you are
60 running \fBypxfr\fR. Otherwise, \fBypxfr\fR complains that it cannot
61 communicate with the local \fBypserv\fR, and the transfer fails.
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB\fB-f\fR\fR
68 .ad
69 .RS 22n
70 Force the transfer to occur even if the version at the master is not more
71 recent than the local version.
72 .RE
74 .sp
75 .ne 2
76 .na
77 \fB\fB-C\fR\fI tid prog server\fR\fR
78 .ad
79 .RS 22n
80 This option is for use \fIonly\fR by \fBypserv\fR. When \fBypserv\fR starts
81 \fBypxfr\fR, it specifies that \fBypxfr\fR should call back a \fByppush\fR
82 process at the host \fIserver\fR, registered as program number \fIprog\fR, and
83 waiting for a response to transaction \fItid\fR.
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fB-d\fR\fI ypdomain\fR\fR
90 .ad
91 .RS 22n
92 Specify a domain other than the default domain.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fB-h\fR \fIhost\fR\fR
99 .ad
100 .RS 22n
101 Get the map from \fIhost\fR, regardless of the master. If \fIhost\fR is not
102 specified, \fBypxfr\fR asks the \fBNIS\fR service for the name of the master,
103 and tries to get the map from there. \fIhost\fR must be a valid host name.
107 .ne 2
109 \fB\fB-s\fR\fI ypdomain\fR\fR
111 .RS 22n
112 Specify a source domain from which to transfer a map that should be the same
113 across domains.
116 .SH FILES
118 .ne 2
120 \fB\fB/var/yp/ypxfr.log\fR\fR
122 .sp .6
123 .RS 4n
124 Log file
128 .ne 2
130 \fB\fB/usr/lib/netsvc/yp/ypxfr_1perday\fR\fR
132 .sp .6
133 .RS 4n
134 Script to run one transfer per day, for use with \fBcron\fR(1M)
138 .ne 2
140 \fB\fB/usr/lib/netsvc/yp/ypxfr_2perday\fR\fR
142 .sp .6
143 .RS 4n
144 Script to run two transfer per day, for use with \fBcron\fR(1M)
148 .ne 2
150 \fB\fB/usr/lib/netsvc/yp/ypxfr_1perhour\fR\fR
152 .sp .6
153 .RS 4n
154 Script for hourly transfers of volatile maps
158 .ne 2
160 \fB\fB/var/yp/\fR\fIypdomain\fR\fR
162 .sp .6
163 .RS 4n
164 \fBNIS\fR domain
168 .ne 2
170 \fB\fB/usr/spool/cron/crontabs/root\fR\fR
172 .sp .6
173 .RS 4n
174 Privileged user's \fBcrontab\fR file
177 .SS "ypxfr_1perday, ypxfr_1perhour, and ypxfr_2perday"
180 .SH SEE ALSO
183 \fBcrontab\fR(1), \fBcron\fR(1M), \fBypinit\fR(1M), \fByppush\fR(1M),
184 \fBypserv\fR(1M), \fBypfiles\fR(4), \fBattributes\fR(5)