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