]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapadd.8
a71696faaa17e1ddc8c5e65fb87439992df174c0
[openldap] / doc / man / man8 / slapadd.8
1 .TH SLAPADD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2003 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 [\-v]
10 .B [\-c]
11 .B [\-u]
12 .B [\-p]
13 .B [\-r]
14 .B [\-w]
15 .B [\-d level]
16 .B [\-b suffix]
17 .B [\-n dbnum]
18 .B [\-i rid1,rid2,...]
19 .B [\-f slapd.conf]
20 .B [\-l ldif-file]
21 .B 
22 .LP
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.  The LDIF input is read from standard input or
33 the specified file.
34 .LP
35 As
36 .B slapadd
37 is designed to accept LDIF in database order, as produced by
38 .BR slapcat (8),
39 it does not verify that superior entries exist before
40 adding an entry, does not perform all user and system
41 schema checks, and does not maintain operational
42 attributes (such as createTimeStamp and modifiersName). 
43 .SH OPTIONS
44 .TP
45 .B \-v
46 enable verbose mode.
47 .TP
48 .B \-c
49 enable continue (ignore errors) mode.
50 .TP
51 .B \-u
52 enable dry-run (don't write to backend) mode.
53 .TP
54 .BI \-p
55 If the LDIF input represents a syncrepl consumer replica,
56 promote it to the syncrepl provider's content after adding
57 the entries.
58 .TP
59 .BI     \-r
60 If the LDIF input represents a syncrepl provider replica,
61 demote it to the syncrepl consumer replica after adding
62 the entries.
63 .TP
64 .BI \-w
65 When used with either 
66 .B \-p
67 or
68 .B \-r,
69 rebuild the new syncrepl
70 information from the contents of the added entries.
71 The syncrepl information contained in the LDIF input
72 file is ignored.
73 .TP
74 .BI \-d " level"
75 enable debugging messages as defined by the specified
76 .IR level .
77 .TP
78 .BI \-b " suffix" 
79 Use the specified \fIsuffix\fR to determine which database to
80 add entries to.  The \-b cannot be used in conjunction
81 with the
82 .B \-n
83 option.
84 .TP
85 .BI \-n " dbnum"
86 Add entries to the \fIdbnum\fR\-th database listed in the
87 configuration file.  The
88 .B \-n
89 cannot be used in conjunction with the
90 .B \-b
91 option.
92 .TP
93 .BI \-i " rid1,rid2,..."
94 Specify the replication ids for one or more syncrepl consumer
95 replicas contained in the LDIF input. If omitted, 0 is used
96 as the replication id.
97 .TP
98 .BI \-f " slapd.conf"
99 specify an alternative
100 .BR slapd.conf (5)
101 file.
102 .TP
103 .BI \-l " ldif-file"
104 Read LDIF from the specified file instead of standard input.
105 .SH LIMITATIONS
106 Your
107 .BR slapd (8)
108 should not be running 
109 when you do this to ensure consistency of the database.
110 .LP
111 .B slapadd 
112 may not provide naming or schema checks.  It is advisable to
113 use
114 .BR ldapadd (1)
115 when adding new entries into an existing directory.
116 .SH EXAMPLES
117 To import a entries specified in file
118 .B ldif
119 into your
120 .BR slapd (8)
121 database give the command:
122 .LP
123 .nf
124 .ft tt
125         SBINDIR/slapadd -l ldif
126 .ft
127 .fi
128 .SH "SEE ALSO"
129 .BR ldap (3),
130 .BR ldif (5),
131 .BR slapcat (8),
132 .BR ldapadd (1),
133 .BR slapd (8)
134 .LP
135 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
136 .SH ACKNOWLEDGEMENTS
137 .B OpenLDAP
138 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
139 .B OpenLDAP
140 is derived from University of Michigan LDAP 3.3 Release.