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