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