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