]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapcat.8
70954fe6636c218af1765f3580e7193c3ce13dcf
[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 [\-l ldif-file]
18 .B 
19 .LP
20 .SH DESCRIPTION
21 .LP
22 .B Slapcat
23 is used to generate an LDAP Directory Interchange Format
24 (LDIF) output based upon the contents of a
25 .BR slapd (8)
26 database.
27 It opens the given database determined by the database number or
28 suffix and writes the corresponding LDIF to standard output or
29 the specified file.
30 Subordinate databases glued with
31 .BR slapo-glue (5)
32 are also output.
33 .LP
34 The LDIF generated by this tool is suitable for use with
35 .BR slapadd (8).
36 As the entries are in database order, not superior first order,
37 they cannot be loaded with
38 .BR ldapadd (1)
39 without first being reordered.
40 .SH OPTIONS
41 .TP
42 .B \-v
43 Enable verbose mode.
44 .TP
45 .B \-c
46 Enable continue (ignore errors) mode.
47 .TP
48 .BI \-d " level"
49 Enable debugging messages as defined by the specified
50 .IR level .
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 .BI \-n " dbnum"
60 Generate output for the \fIdbnum\fR\-th database listed in the
61 configuration file.  The
62 .B \-n
63 cannot be used in conjunction with the
64 .B \-b
65 option.
66 .TP
67 .BI \-a " filter"
68 Only dump entries matching the asserted filter.
69 For example
70
71 slapcat -a \\
72     "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
73
74 will dump all but the "ou=People,dc=example,dc=com" subtree
75 of the "dc=example,dc=com" database.
76 .TP
77 .BI \-s " subtree-dn"
78 Only dump entries in the subtree specified by this DN.
79 Implies `-b subtree-dn' if no
80 .B \-b
81 or
82 .B \-n
83 option is given.
84 .TP
85 .BI \-f " slapd.conf"
86 Specify an alternative
87 .BR slapd.conf (5)
88 file.
89 .TP
90 .BI \-l " ldif-file"
91 Write LDIF to specified file instead of standard output.
92 .SH LIMITATIONS
93 In general, your
94 .BR slapd (8)
95 should not be running (at least, not in read-write
96 mode) when you do this to ensure consistency of the database.
97 .SH EXAMPLES
98 To make a text backup of your SLAPD database and put it in a file called
99 .BR ldif ,
100 give the command:
101 .LP
102 .nf
103 .ft tt
104         SBINDIR/slapcat -l ldif
105 .ft
106 .fi
107 .SH "SEE ALSO"
108 .BR ldap (3),
109 .BR ldif (5),
110 .BR slapadd (8),
111 .BR ldapadd (1),
112 .BR slapd (8)
113 .LP
114 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
115 .SH ACKNOWLEDGEMENTS
116 .B OpenLDAP
117 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
118 .B OpenLDAP
119 is derived from University of Michigan LDAP 3.3 Release.