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