]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapindex.8
Merge remote-tracking branch 'origin/mdb.RE/0.9'
[openldap] / doc / man / man8 / slapindex.8
1 .TH SLAPINDEX 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2016 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapindex \- Reindex entries in a SLAPD database
7 .SH SYNOPSIS
8 .B SBINDIR/slapindex
9 [\c
10 .BI \-b \ suffix\fR]
11 [\c
12 .BR \-c ]
13 [\c
14 .BI \-d \ debug-level\fR]
15 [\c
16 .BI \-f \ slapd.conf\fR]
17 [\c
18 .BI \-F \ confdir\fR]
19 [\c
20 .BR \-g ]
21 [\c
22 .BI \-n \ dbnum\fR]
23 [\c
24 .BI \-o \ option\fR[ = value\fR]]
25 [\c
26 .BR \-q ]
27 [\c
28 .BR \-t ]
29 [\c
30 .BR \-v ]
31 [\c
32 .IR attr [ ... ]]
33 .B 
34 .LP
35 .SH DESCRIPTION
36 .LP
37 .B Slapindex
38 is used to regenerate
39 .BR slapd (8)
40 indices based upon the current contents of a database.
41 It opens the given database determined by the database number or
42 suffix and updates the indices for all values of all attributes
43 of all entries. If a list of specific attributes is provided
44 on the command line, only the indices for those attributes will
45 be regenerated.
46 Databases configured as
47 .B subordinate
48 of this one are also re-indexed, unless \fB\-g\fP is specified.
49
50 All files eventually created by
51 .BR slapindex
52 will belong to the identity
53 .BR slapindex
54 is run as, so make sure you either run
55 .BR slapindex
56 with the same identity
57 .BR slapd (8)
58 will be run as (see option
59 .B \-u
60 in
61 .BR slapd (8)),
62 or change file ownership before running
63 .BR slapd (8).
64 .SH OPTIONS
65 .TP
66 .BI \-b \ suffix
67 Use the specified \fIsuffix\fR to determine which database to
68 generate output for.  The \fB\-b\fP cannot be used in conjunction
69 with the
70 .B \-n
71 option.
72 .TP
73 .B \-c
74 enable continue (ignore errors) mode.
75 .TP
76 .BI \-d \ debug-level
77 enable debugging messages as defined by the specified
78 .IR debug-level ;
79 see
80 .BR slapd (8)
81 for details.
82 .TP
83 .BI \-f \ slapd.conf
84 specify an alternative
85 .BR slapd.conf (5)
86 file.
87 .TP
88 .BI \-F \ confdir
89 specify a config directory.
90 If both
91 .B \-f
92 and
93 .B \-F
94 are specified, the config file will be read and converted to
95 config directory format and written to the specified directory.
96 If neither option is specified, an attempt to read the
97 default config directory will be made before trying to use the default
98 config file. If a valid config directory exists then the
99 default config file is ignored.
100 .TP
101 .B \-g
102 disable subordinate gluing.  Only the specified database will be
103 processed, and not its glued subordinates (if any).
104 .TP
105 .BI \-n \ dbnum
106 Generate output for the \fIdbnum\fR-th database listed in the
107 configuration file. The config database
108 .BR slapd\-config (5),
109 is always the first database, so use
110 .B \-n 0
111
112 The
113 .B \-n
114 cannot be used in conjunction with the
115 .B \-b
116 option.
117 .TP
118 .BI \-o \ option\fR[ = value\fR]
119 Specify an
120 .I option
121 with a(n optional)
122 .IR 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. Performs no consistency checks
134 when writing the database. Improves indexing time,
135 .B however
136 the database will most likely be unusable if any errors or
137 interruptions occur.
138 .TP
139 .B \-t
140 enable truncate mode. Truncates (empties) an index database before indexing
141 any entries. May only be used with Quick mode.
142 .TP
143 .B \-v
144 enable verbose mode.
145 .SH LIMITATIONS
146 Your
147 .BR slapd (8)
148 should not be running (at least, not in read-write
149 mode) when you do this to ensure consistency of the database.
150 .LP
151 This command provides ample opportunity for the user to obtain
152 and drink their favorite beverage.
153 .SH EXAMPLES
154 To reindex your SLAPD database, give the command:
155 .LP
156 .nf
157 .ft tt
158         SBINDIR/slapindex
159 .ft
160 .fi
161 To regenerate the index for only a specific attribute, e.g. "uid",
162 give the command:
163 .LP
164 .nf
165 .ft tt
166         SBINDIR/slapindex uid
167 .ft
168 .fi
169 .SH "SEE ALSO"
170 .BR ldap (3),
171 .BR ldif (5),
172 .BR slapadd (8),
173 .BR ldapadd (1),
174 .BR slapd (8)
175 .LP
176 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
177 .SH ACKNOWLEDGEMENTS
178 .so ../Project