]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapadd.8
ITS#5283
[openldap] / doc / man / man8 / slapadd.8
1 .TH SLAPADD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2007 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 .TP
112 .BI \-o " option[=value]"
113 Specify an
114 .BR option
115 with a(n optional)
116 .BR value .
117 Possible generic options/values are:
118 .LP
119 .nf
120               syslog=<subsystems>  (see `\-s' in slapd(8))
121               syslog-level=<level> (see `\-S' in slapd(8))
122               syslog-user=<user>   (see `\-l' in slapd(8))
123
124 .fi
125 .TP
126 .B \-q
127 enable quick (fewer integrity checks) mode.  Does fewer consistency checks
128 on the input data, and no consistency checks when writing the database.
129 Improves the load time but if any errors or interruptions occur the resulting
130 database will be unusable.
131 .TP
132 .B -s
133 disable schema checking.  This option is intended to be used when loading
134 databases containing special objects, such as fractional objects on a
135 partial replica.  Loading normal objects which do not conform to
136 schema may result in unexpected and ill behavior.
137 .TP
138 .B \-S " SID"
139 Server ID to use in generated entryCSN.  Also used for contextCSN
140 if `\-w' is set as well.  Defaults to 0.
141 .TP
142 .B \-u
143 enable dry-run (don't write to backend) mode.
144 .TP
145 .B \-v
146 enable verbose mode.
147 .TP
148 .BI \-w
149 write syncrepl context information.
150 After all entries are added, the contextCSN
151 will be updated with the greatest CSN in the database.
152 .SH LIMITATIONS
153 Your
154 .BR slapd (8)
155 should not be running 
156 when you do this to ensure consistency of the database.
157 .LP
158 .B slapadd 
159 may not provide naming or schema checks.  It is advisable to
160 use
161 .BR ldapadd (1)
162 when adding new entries into an existing directory.
163 .SH EXAMPLES
164 To import the entries specified in file
165 .B ldif
166 into your
167 .BR slapd (8)
168 database give the command:
169 .LP
170 .nf
171 .ft tt
172         SBINDIR/slapadd -l ldif
173 .ft
174 .fi
175 .SH "SEE ALSO"
176 .BR ldap (3),
177 .BR ldif (5),
178 .BR slapcat (8),
179 .BR ldapadd (1),
180 .BR slapd (8)
181 .LP
182 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
183 .SH ACKNOWLEDGEMENTS
184 .so ../Project