]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapcat.8
Happy new year!
[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 LDIF generated by this tool is suitable for use with
37 .BR slapadd (8).
38 As the entries are in database order, not superior first order,
39 they cannot be loaded with
40 .BR ldapadd (1)
41 without first being reordered.
42 .SH OPTIONS
43 .TP
44 .B \-v
45 Enable verbose mode.
46 .TP
47 .B \-c
48 Enable continue (ignore errors) mode.
49 .TP
50 .B \-g
51 disable subordinate gluing.  Only the specified database will be
52 processed, and not its glued subordinates (if any).
53 .TP
54 .BI \-d " level"
55 Enable debugging messages as defined by the specified
56 .IR level .
57 .TP
58 .BI \-b " suffix" 
59 Use the specified \fIsuffix\fR to determine which database to
60 generate output for.  The \-b cannot be used in conjunction
61 with the
62 .B \-n
63 option.
64 .TP
65 .BI \-n " dbnum"
66 Generate output for the \fIdbnum\fR\-th database listed in the
67 configuration file.  The
68 .B \-n
69 cannot be used in conjunction with the
70 .B \-b
71 option.
72 .TP
73 .BI \-a " filter"
74 Only dump entries matching the asserted filter.
75 For example
76
77 slapcat -a \\
78     "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
79
80 will dump all but the "ou=People,dc=example,dc=com" subtree
81 of the "dc=example,dc=com" database.
82 .TP
83 .BI \-s " subtree-dn"
84 Only dump entries in the subtree specified by this DN.
85 Implies `-b subtree-dn' if no
86 .B \-b
87 or
88 .B \-n
89 option is given.
90 .TP
91 .BI \-f " slapd.conf"
92 Specify an alternative
93 .BR slapd.conf (5)
94 file.
95 .TP
96 .BI \-F " confdir"
97 specify a config directory.
98 If both
99 .B -f
100 and
101 .B -F
102 are specified, the config file will be read and converted to
103 config directory format and written to the specified directory.
104 If neither option is specified, an attempt to read the
105 default config directory will be made before trying to use the default
106 config file. If a valid config directory exists then the
107 default config file is ignored.
108 .TP
109 .BI \-l " ldif-file"
110 Write LDIF to specified file instead of standard output.
111 .SH LIMITATIONS
112 In general, your
113 .BR slapd (8)
114 should not be running (at least, not in read-write
115 mode) when you do this to ensure consistency of the database.
116 .SH EXAMPLES
117 To make a text backup of your SLAPD database and put it in a file called
118 .BR ldif ,
119 give the command:
120 .LP
121 .nf
122 .ft tt
123         SBINDIR/slapcat -l ldif
124 .ft
125 .fi
126 .SH "SEE ALSO"
127 .BR ldap (3),
128 .BR ldif (5),
129 .BR slapadd (8),
130 .BR ldapadd (1),
131 .BR slapd (8)
132 .LP
133 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
134 .SH ACKNOWLEDGEMENTS
135 .B OpenLDAP
136 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
137 .B OpenLDAP
138 is derived from University of Michigan LDAP 3.3 Release.