]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapcat.8
Further details as to why slapcat(8) output cannot be used
[openldap] / doc / man / man8 / slapcat.8
1 .TH SLAPCAT 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2006 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 slapcat \- SLAPD database to LDIF utility
7 .SH SYNOPSIS
8 .B SBINDIR/slapcat
9 .B [\-v]
10 .B [\-c]
11 .B [\-g]
12 .B [\-d level]
13 .B [\-b suffix]
14 .B [\-n dbnum]
15 .B [\-a filter]
16 .B [\-s subtree-dn]
17 .B [\-f slapd.conf]
18 .B [\-F confdir]
19 .B [\-l ldif-file]
20 .B 
21 .LP
22 .SH DESCRIPTION
23 .LP
24 .B Slapcat
25 is used to generate an LDAP Directory Interchange Format
26 (LDIF) output based upon 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 writes the corresponding LDIF to standard output or
31 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 The entry records are presented in database order, not superior first
37 order.  The entry records will include all (user and operational)
38 attributes stored in the database.  The entry records will not include
39 dynamically generated attributes (such as subschemaSubentry).
40 .LP
41 The output of slapcat is intended to be used as input to
42 .BR slapadd (8).
43 The output of slapcat cannot generally be used as input to
44 .BR ldapadd (1)
45 or other LDAP clients without first editing the output.
46 This editing would normally include reordering the records
47 into superior first order and removing no-user-modification
48 operational attributes.
49 .SH OPTIONS
50 .TP
51 .B \-v
52 Enable verbose mode.
53 .TP
54 .B \-c
55 Enable continue (ignore errors) mode.
56 .TP
57 .B \-g
58 disable subordinate gluing.  Only the specified database will be
59 processed, and not its glued subordinates (if any).
60 .TP
61 .BI \-d " level"
62 Enable debugging messages as defined by the specified
63 .IR level .
64 .TP
65 .BI \-b " suffix" 
66 Use the specified \fIsuffix\fR to determine which database to
67 generate output for.  The \-b cannot be used in conjunction
68 with the
69 .B \-n
70 option.
71 .TP
72 .BI \-n " dbnum"
73 Generate output for the \fIdbnum\fR\-th database listed in the
74 configuration file.  The
75 .B \-n
76 cannot be used in conjunction with the
77 .B \-b
78 option.
79 .TP
80 .BI \-a " filter"
81 Only dump entries matching the asserted filter.
82 For example
83
84 slapcat -a \\
85     "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
86
87 will dump all but the "ou=People,dc=example,dc=com" subtree
88 of the "dc=example,dc=com" database.
89 .TP
90 .BI \-s " subtree-dn"
91 Only dump entries in the subtree specified by this DN.
92 Implies `-b subtree-dn' if no
93 .B \-b
94 or
95 .B \-n
96 option is given.
97 .TP
98 .BI \-f " slapd.conf"
99 Specify an alternative
100 .BR slapd.conf (5)
101 file.
102 .TP
103 .BI \-F " confdir"
104 specify a config directory.
105 If both
106 .B -f
107 and
108 .B -F
109 are specified, the config file will be read and converted to
110 config directory format and written to the specified directory.
111 If neither option is specified, an attempt to read the
112 default config directory will be made before trying to use the default
113 config file. If a valid config directory exists then the
114 default config file is ignored.
115 .TP
116 .BI \-l " ldif-file"
117 Write LDIF to specified file instead of standard output.
118 .SH LIMITATIONS
119 In general, your
120 .BR slapd (8)
121 should not be running (at least, not in read-write
122 mode) when you do this to ensure consistency of the database.
123 .SH EXAMPLES
124 To make a text backup of your SLAPD database and put it in a file called
125 .BR ldif ,
126 give the command:
127 .LP
128 .nf
129 .ft tt
130         SBINDIR/slapcat -l ldif
131 .ft
132 .fi
133 .SH "SEE ALSO"
134 .BR ldap (3),
135 .BR ldif (5),
136 .BR slapadd (8),
137 .BR ldapadd (1),
138 .BR slapd (8)
139 .LP
140 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
141 .SH ACKNOWLEDGEMENTS
142 .B OpenLDAP
143 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
144 .B OpenLDAP
145 is derived from University of Michigan LDAP 3.3 Release.