]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapschema.8
add slapschema tool (ITS#6150)
[openldap] / doc / man / man8 / slapschema.8
1 .TH SLAPSCHEMA 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2009 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapschema \- SLAPD in-database schema checking utility
7 .SH SYNOPSIS
8 .B SBINDIR/slapschema
9 .B [\-a filter]
10 .B [\-b suffix]
11 .B [\-c]
12 .B [\-d level]
13 .B [\-f slapd.conf]
14 .B [\-F confdir]
15 .B [\-g]
16 .B [\-l error-file]
17 .B [\-n dbnum]
18 .B [\-o name[=value]]
19 .B [\-s subtree-dn]
20 .B [\-v]
21 .B 
22 .LP
23 .SH DESCRIPTION
24 .LP
25 .B Slapschema
26 is used to check schema compliance of the contents of a
27 .BR slapd (8)
28 database.
29 It opens the given database determined by the database number or
30 suffix and checks the compliance of its contents with the corresponding
31 schema. Errors are written to standard output or the specified file.
32 Databases configured as
33 .B subordinate
34 of this one are also output, unless \fB-g\fP is specified.
35 .LP
36 Administrators may need to modify existing schema items, including
37 adding new required attributes to objectClasses,
38 removing existing required or allowed attributes from objectClasses,
39 entirely removing objectClasses,
40 or any other change that may result in making perfectly valid entries
41 no longer compliant with the modified schema.
42 The execution of the
43 .B slapschema tool after modifying the schema can point out
44 inconsistencies that would otherwise surface only as soon as
45 inconsistent entries need to be modified.
46
47 .LP
48 The entry records are checked in database order, not superior first
49 order.  The entry records will be checked considering all
50 (user and operational) attributes stored in the database.
51 Dynamically generated attributes (such as subschemaSubentry)
52 will not be considered.
53 .SH OPTIONS
54 .TP
55 .BI \-a " filter"
56 Only check entries matching the asserted filter.
57 For example
58
59 slapschema -a \\
60     "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
61
62 will check all but the "ou=People,dc=example,dc=com" subtree
63 of the "dc=example,dc=com" database.
64 .TP
65 .BI \-b " suffix" 
66 Use the specified \fIsuffix\fR to determine which database to
67 check.  The \-b cannot be used in conjunction
68 with the
69 .B \-n
70 option.
71 .TP
72 .B \-c
73 Enable continue (ignore errors) mode.
74 .TP
75 .BI \-d " level"
76 Enable debugging messages as defined by the specified
77 .IR level ;
78 see
79 .BR slapd (8)
80 for details.
81 .TP
82 .BI \-f " slapd.conf"
83 Specify an alternative
84 .BR slapd.conf (5)
85 file.
86 .TP
87 .BI \-F " confdir"
88 specify a config directory.
89 If both
90 .B -f
91 and
92 .B -F
93 are specified, the config file will be read and converted to
94 config directory format and written to the specified directory.
95 If neither option is specified, an attempt to read the
96 default config directory will be made before trying to use the default
97 config file. If a valid config directory exists then the
98 default config file is ignored.
99 .TP
100 .B \-g
101 disable subordinate gluing.  Only the specified database will be
102 processed, and not its glued subordinates (if any).
103 .TP
104 .BI \-l " error-file"
105 Write errors to specified file instead of standard output.
106 .TP
107 .BI \-n " dbnum"
108 Check the \fIdbnum\fR\-th database listed in the
109 configuration file. The config database
110 .BR slapd-config (5),
111 is always the first database, so use
112 .B \-n 0
113
114 The
115 .B \-n
116 cannot be used in conjunction with the
117 .B \-b
118 option.
119 .TP
120 .BI \-o " option[=value]"
121 Specify an
122 .BR option
123 with a(n optional)
124 .BR value .
125 Possible generic options/values are:
126 .LP
127 .nf
128               syslog=<subsystems>  (see `\-s' in slapd(8))
129               syslog-level=<level> (see `\-S' in slapd(8))
130               syslog-user=<user>   (see `\-l' in slapd(8))
131
132 .fi
133 .TP
134 .BI \-s " subtree-dn"
135 Only check entries in the subtree specified by this DN.
136 Implies `-b subtree-dn' if no
137 .B \-b
138 nor
139 .B \-n
140 option is given.
141 .TP
142 .B \-v
143 Enable verbose mode.
144 .SH LIMITATIONS
145 For some backend types, your
146 .BR slapd (8)
147 should not be running (at least, not in read-write
148 mode) when you do this to ensure consistency of the database. It is
149 always safe to run 
150 .B slapschema
151 with the
152 .BR slapd-bdb (5),
153 .BR slapd-hdb (5),
154 and
155 .BR slapd-null (5)
156 backends.
157 .SH EXAMPLES
158 To check the schema compliance of your SLAPD database after modifications
159 to the schema, and put any error in a file called
160 .BR errors.ldif ,
161 give the command:
162 .LP
163 .nf
164 .ft tt
165         SBINDIR/slapcat -l errors.ldif
166 .ft
167 .fi
168 .SH "SEE ALSO"
169 .BR ldap (3),
170 .BR ldif (5),
171 .BR slapd (8)
172 .LP
173 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
174 .SH ACKNOWLEDGEMENTS
175 .so ../Project