]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapadd.8
ITS#6023 minor formatting tweaks
[openldap] / doc / man / man8 / slapadd.8
1 .TH SLAPADD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2009 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 .SH OPTIONS
71 .TP
72 .BI \-b \ suffix 
73 Use the specified \fIsuffix\fR to determine which database to
74 add entries to.  The \fB\-b\fP cannot be used in conjunction
75 with the
76 .B \-n
77 option.
78 .TP
79 .B \-c
80 enable continue (ignore errors) mode.
81 .TP
82 .BI \-d \ debug-level
83 enable debugging messages as defined by the specified
84 .IR debug-level ;
85 see
86 .BR slapd (8)
87 for details.
88 .TP
89 .BI \-f \ slapd.conf
90 specify an alternative
91 .BR slapd.conf (5)
92 file.
93 .TP
94 .BI \-F \ confdir
95 specify a config directory.
96 If both
97 .B \-f
98 and
99 .B \-F
100 are specified, the config file will be read and converted to
101 config directory format and written to the specified directory.
102 If neither option is specified, an attempt to read the
103 default config directory will be made before trying to use the default
104 config file. If a valid config directory exists then the
105 default config file is ignored. If dry-run mode is also specified,
106 no conversion will occur.
107 .TP
108 .B \-g
109 disable subordinate gluing.  Only the specified database will be
110 processed, and not its glued subordinates (if any).
111 .TP
112 .BI \-j \ lineno
113 Jump to the specified line number in the LDIF file before processing
114 any entries. This allows a load that was aborted due to errors in the
115 input LDIF to be resumed after the errors are corrected.
116 .TP
117 .BI \-l \ ldif-file
118 Read LDIF from the specified file instead of standard input.
119 .TP
120 .BI \-n \ dbnum
121 Add entries to the \fIdbnum\fR-th database listed in the
122 configuration file.  The
123 .B \-n
124 cannot be used in conjunction with the
125 .B \-b
126 option.
127 To populate the config database
128 .BR slapd\-config (5),
129 use 
130 .B \-n 0
131 as it is always the first database. It must physically exist
132 on the filesystem prior to this, however.
133 .TP
134 .BI \-o \ option\fR[ = value\fR]
135 Specify an
136 .I option
137 with a(n optional)
138 .IR value .
139 Possible generic options/values are:
140 .LP
141 .nf
142               syslog=<subsystems>  (see `\-s' in slapd(8))
143               syslog\-level=<level> (see `\-S' in slapd(8))
144               syslog\-user=<user>   (see `\-l' in slapd(8))
145
146 .fi
147 .TP
148 .B \-q
149 enable quick (fewer integrity checks) mode.  Does fewer consistency checks
150 on the input data, and no consistency checks when writing the database.
151 Improves the load time but if any errors or interruptions occur the resulting
152 database will be unusable.
153 .TP
154 .B \-s
155 disable schema checking.  This option is intended to be used when loading
156 databases containing special objects, such as fractional objects on a
157 partial replica.  Loading normal objects which do not conform to
158 schema may result in unexpected and ill behavior.
159 .TP
160 .BI \-S \ SID
161 Server ID to use in generated entryCSN.  Also used for contextCSN
162 if \fB\-w\fP is set as well.  Defaults to \fB0\fP.
163 .TP
164 .B \-u
165 enable dry-run (don't write to backend) mode.
166 .TP
167 .B \-v
168 enable verbose mode.
169 .TP
170 .BI \-w
171 write syncrepl context information.
172 After all entries are added, the contextCSN
173 will be updated with the greatest CSN in the database.
174 .SH LIMITATIONS
175 Your
176 .BR slapd (8)
177 should not be running 
178 when you do this to ensure consistency of the database.
179 .LP
180 .B slapadd 
181 may not provide naming or schema checks.  It is advisable to
182 use
183 .BR ldapadd (1)
184 when adding new entries into an existing directory.
185 .SH EXAMPLES
186 To import the entries specified in file
187 .B ldif
188 into your
189 .BR slapd (8)
190 database give the command:
191 .LP
192 .nf
193 .ft tt
194         SBINDIR/slapadd \-l ldif
195 .ft
196 .fi
197 .SH "SEE ALSO"
198 .BR ldap (3),
199 .BR ldif (5),
200 .BR slapcat (8),
201 .BR ldapadd (1),
202 .BR slapd (8)
203 .LP
204 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
205 .SH ACKNOWLEDGEMENTS
206 .so ../Project