]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapadd.8
ITS#8215 Manpage fixes
[openldap] / doc / man / man8 / slapadd.8
1 .TH SLAPADD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2015 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapadd \- Add entries to a SLAPD database
7 .SH SYNOPSIS
8 .B SBINDIR/slapadd
9 [\c
10 .BI \-b \ suffix\fR]
11 [\c
12 .BR \-c ]
13 [\c
14 .BI \-d \ debug-level\fR]
15 [\c
16 .BI \-f \ slapd.conf\fR]
17 [\c
18 .BI \-F \ confdir\fR]
19 [\c
20 .BR \-g ]
21 [\c
22 .BI \-j \ lineno\fR]
23 [\c
24 .BI \-l \ ldif-file\fR]
25 [\c
26 .BI \-n \ dbnum\fR]
27 [\c
28 .BI \-o \ option\fR[ = value\fR]]
29 [\c
30 .BR \-q ]
31 [\c
32 .BR \-s ]
33 [\c
34 .BI \-S \ SID\fR]
35 [\c
36 .BR \-u ]
37 [\c
38 .BR \-v ]
39 [\c
40 .BR \-w ]
41 .SH DESCRIPTION
42 .LP
43 .B Slapadd
44 is used to add entries specified in LDAP Directory Interchange Format
45 (LDIF) to a
46 .BR slapd (8)
47 database.
48 It opens the given database determined by the database number or
49 suffix and adds entries corresponding to the provided LDIF to
50 the database.
51 Databases configured as
52 .B subordinate
53 of this one are also updated, unless \fB\-g\fP is specified.
54 The LDIF input is read from standard input or the specified file.
55
56 All files eventually created by
57 .BR slapadd
58 will belong to the identity
59 .BR slapadd
60 is run as, so make sure you either run
61 .BR slapadd
62 with the same identity
63 .BR slapd (8)
64 will be run as (see option
65 .B \-u
66 in
67 .BR slapd (8)),
68 or change file ownership before running
69 .BR slapd (8).
70
71 Note: slapadd will also perform the relevant indexing whilst adding the database if
72 any are configured. For specific details, please see
73 .BR slapindex (8).
74 .SH OPTIONS
75 .TP
76 .BI \-b \ suffix 
77 Use the specified \fIsuffix\fR to determine which database to
78 add entries to.  The \fB\-b\fP cannot be used in conjunction
79 with the
80 .B \-n
81 option.
82 .TP
83 .B \-c
84 enable continue (ignore errors) mode.
85 .TP
86 .BI \-d \ debug-level
87 enable debugging messages as defined by the specified
88 .IR debug-level ;
89 see
90 .BR slapd (8)
91 for details.
92 .TP
93 .BI \-f \ slapd.conf
94 specify an alternative
95 .BR slapd.conf (5)
96 file.
97 .TP
98 .BI \-F \ confdir
99 specify a config directory.
100 If both
101 .B \-f
102 and
103 .B \-F
104 are specified, the config file will be read and converted to
105 config directory format and written to the specified directory.
106 If neither option is specified, an attempt to read the
107 default config directory will be made before trying to use the default
108 config file. If a valid config directory exists then the
109 default config file is ignored. If dry-run mode is also specified,
110 no conversion will occur.
111 .TP
112 .B \-g
113 disable subordinate gluing.  Only the specified database will be
114 processed, and not its glued subordinates (if any).
115 .TP
116 .BI \-j \ lineno
117 Jump to the specified line number in the LDIF file before processing
118 any entries. This allows a load that was aborted due to errors in the
119 input LDIF to be resumed after the errors are corrected.
120 .TP
121 .BI \-l \ ldif-file
122 Read LDIF from the specified file instead of standard input.
123 .TP
124 .BI \-n \ dbnum
125 Add entries to the \fIdbnum\fR-th database listed in the
126 configuration file.  The
127 .B \-n
128 cannot be used in conjunction with the
129 .B \-b
130 option.
131 To populate the config database
132 .BR slapd\-config (5),
133 use 
134 .B \-n 0
135 as it is always the first database. It must physically exist
136 on the filesystem prior to this, however.
137 .TP
138 .BI \-o \ option\fR[ = value\fR]
139 Specify an
140 .I option
141 with a(n optional)
142 .IR value .
143 Possible generic options/values are:
144 .LP
145 .nf
146               syslog=<subsystems>  (see `\-s' in slapd(8))
147               syslog\-level=<level> (see `\-S' in slapd(8))
148               syslog\-user=<user>   (see `\-l' in slapd(8))
149
150               schema-check={yes|no}
151               value-check={yes|no}
152
153 .in
154 The \fIschema\-check\fR option toggles schema checking (default on);
155 the \fIvalue\-check\fR option toggles value checking (default off).
156 The latter is incompatible with \fB-q\fR.
157 .TP
158 .B \-q
159 enable quick (fewer integrity checks) mode.  Does fewer consistency checks
160 on the input data, and no consistency checks when writing the database.
161 Improves the load time but if any errors or interruptions occur the resulting
162 database will be unusable.
163 .TP
164 .B \-s
165 disable schema checking.  This option is intended to be used when loading
166 databases containing special objects, such as fractional objects on a
167 partial replica.  Loading normal objects which do not conform to
168 schema may result in unexpected and ill behavior.
169 .TP
170 .BI \-S \ SID
171 Server ID to use in generated entryCSN.  Also used for contextCSN
172 if \fB\-w\fP is set as well.  Defaults to \fB0\fP.
173 .TP
174 .B \-u
175 enable dry-run (don't write to backend) mode.
176 .TP
177 .B \-v
178 enable verbose mode.
179 .TP
180 .BI \-w
181 write syncrepl context information.
182 After all entries are added, the contextCSN
183 will be updated with the greatest CSN in the database.
184 .SH LIMITATIONS
185 Your
186 .BR slapd (8)
187 should not be running 
188 when you do this to ensure consistency of the database.
189 .LP
190 .B slapadd 
191 may not provide naming or schema checks.  It is advisable to
192 use
193 .BR ldapadd (1)
194 when adding new entries into an existing directory.
195 .SH EXAMPLES
196 To import the entries specified in file
197 .B ldif
198 into your
199 .BR slapd (8)
200 database give the command:
201 .LP
202 .nf
203 .ft tt
204         SBINDIR/slapadd \-l ldif
205 .ft
206 .fi
207 .SH "SEE ALSO"
208 .BR ldap (3),
209 .BR ldif (5),
210 .BR slapcat (8),
211 .BR slapindex (8),
212 .BR ldapadd (1),
213 .BR slapd (8)
214 .LP
215 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
216 .SH ACKNOWLEDGEMENTS
217 .so ../Project