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