]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapadd.8
happy belated new year
[openldap] / doc / man / man8 / slapadd.8
1 .TH SLAPADD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2010 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 specfic 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 .fi
151 .TP
152 .B \-q
153 enable quick (fewer integrity checks) mode.  Does fewer consistency checks
154 on the input data, and no consistency checks when writing the database.
155 Improves the load time but if any errors or interruptions occur the resulting
156 database will be unusable.
157 .TP
158 .B \-s
159 disable schema checking.  This option is intended to be used when loading
160 databases containing special objects, such as fractional objects on a
161 partial replica.  Loading normal objects which do not conform to
162 schema may result in unexpected and ill behavior.
163 .TP
164 .BI \-S \ SID
165 Server ID to use in generated entryCSN.  Also used for contextCSN
166 if \fB\-w\fP is set as well.  Defaults to \fB0\fP.
167 .TP
168 .B \-u
169 enable dry-run (don't write to backend) mode.
170 .TP
171 .B \-v
172 enable verbose mode.
173 .TP
174 .BI \-w
175 write syncrepl context information.
176 After all entries are added, the contextCSN
177 will be updated with the greatest CSN in the database.
178 .SH LIMITATIONS
179 Your
180 .BR slapd (8)
181 should not be running 
182 when you do this to ensure consistency of the database.
183 .LP
184 .B slapadd 
185 may not provide naming or schema checks.  It is advisable to
186 use
187 .BR ldapadd (1)
188 when adding new entries into an existing directory.
189 .SH EXAMPLES
190 To import the entries specified in file
191 .B ldif
192 into your
193 .BR slapd (8)
194 database give the command:
195 .LP
196 .nf
197 .ft tt
198         SBINDIR/slapadd \-l ldif
199 .ft
200 .fi
201 .SH "SEE ALSO"
202 .BR ldap (3),
203 .BR ldif (5),
204 .BR slapcat (8),
205 .BR slapindex (8),
206 .BR ldapadd (1),
207 .BR slapd (8)
208 .LP
209 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
210 .SH ACKNOWLEDGEMENTS
211 .so ../Project