~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to doc/man/man8/slapcat.8

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2008-07-10 14:45:49 UTC
  • Revision ID: james.westby@ubuntu.com-20080710144549-wck73med0e72gfyo
Tags: upstream-2.4.10
ImportĀ upstreamĀ versionĀ 2.4.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH SLAPCAT 8C "RELEASEDATE" "OpenLDAP LDVERSION"
 
2
.\" $OpenLDAP: pkg/ldap/doc/man/man8/slapcat.8,v 1.28.2.7 2008/02/11 23:26:40 kurt Exp $
 
3
.\" Copyright 1998-2008 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 [\-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 ldif-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 Slapcat
 
26
is used to generate an LDAP Directory Interchange Format
 
27
(LDIF) output based upon the contents of a
 
28
.BR slapd (8)
 
29
database.
 
30
It opens the given database determined by the database number or
 
31
suffix and writes the corresponding LDIF to standard output or
 
32
the specified file.
 
33
Databases configured as
 
34
.B subordinate
 
35
of this one are also output, unless \fB-g\fP is specified.
 
36
.LP
 
37
The entry records are presented in database order, not superior first
 
38
order.  The entry records will include all (user and operational)
 
39
attributes stored in the database.  The entry records will not include
 
40
dynamically generated attributes (such as subschemaSubentry).
 
41
.LP
 
42
The output of slapcat is intended to be used as input to
 
43
.BR slapadd (8).
 
44
The output of slapcat cannot generally be used as input to
 
45
.BR ldapadd (1)
 
46
or other LDAP clients without first editing the output.
 
47
This editing would normally include reordering the records
 
48
into superior first order and removing no-user-modification
 
49
operational attributes.
 
50
.SH OPTIONS
 
51
.TP
 
52
.BI \-a " filter"
 
53
Only dump entries matching the asserted filter.
 
54
For example
 
55
 
 
56
slapcat -a \\
 
57
    "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
 
58
 
 
59
will dump all but the "ou=People,dc=example,dc=com" subtree
 
60
of the "dc=example,dc=com" database.
 
61
.TP
 
62
.BI \-b " suffix" 
 
63
Use the specified \fIsuffix\fR to determine which database to
 
64
generate output for.  The \-b cannot be used in conjunction
 
65
with the
 
66
.B \-n
 
67
option.
 
68
.TP
 
69
.B \-c
 
70
Enable continue (ignore errors) mode.
 
71
.TP
 
72
.BI \-d " level"
 
73
Enable debugging messages as defined by the specified
 
74
.IR level ;
 
75
see
 
76
.BR slapd (8)
 
77
for details.
 
78
.TP
 
79
.BI \-f " slapd.conf"
 
80
Specify an alternative
 
81
.BR slapd.conf (5)
 
82
file.
 
83
.TP
 
84
.BI \-F " confdir"
 
85
specify a config directory.
 
86
If both
 
87
.B -f
 
88
and
 
89
.B -F
 
90
are specified, the config file will be read and converted to
 
91
config directory format and written to the specified directory.
 
92
If neither option is specified, an attempt to read the
 
93
default config directory will be made before trying to use the default
 
94
config file. If a valid config directory exists then the
 
95
default config file is ignored.
 
96
.TP
 
97
.B \-g
 
98
disable subordinate gluing.  Only the specified database will be
 
99
processed, and not its glued subordinates (if any).
 
100
.TP
 
101
.BI \-l " ldif-file"
 
102
Write LDIF to specified file instead of standard output.
 
103
.TP
 
104
.BI \-n " dbnum"
 
105
Generate output for the \fIdbnum\fR\-th database listed in the
 
106
configuration file.  The
 
107
.B \-n
 
108
cannot be used in conjunction with the
 
109
.B \-b
 
110
option.
 
111
.TP
 
112
.BI \-o " option[=value]"
 
113
Specify an
 
114
.BR option
 
115
with a(n optional)
 
116
.BR value .
 
117
Possible generic options/values are:
 
118
.LP
 
119
.nf
 
120
              syslog=<subsystems>  (see `\-s' in slapd(8))
 
121
              syslog-level=<level> (see `\-S' in slapd(8))
 
122
              syslog-user=<user>   (see `\-l' in slapd(8))
 
123
 
 
124
.fi
 
125
.TP
 
126
.BI \-s " subtree-dn"
 
127
Only dump entries in the subtree specified by this DN.
 
128
Implies `-b subtree-dn' if no
 
129
.B \-b
 
130
or
 
131
.B \-n
 
132
option is given.
 
133
.TP
 
134
.B \-v
 
135
Enable verbose mode.
 
136
.SH LIMITATIONS
 
137
For some backend types, your
 
138
.BR slapd (8)
 
139
should not be running (at least, not in read-write
 
140
mode) when you do this to ensure consistency of the database. It is
 
141
always safe to run 
 
142
.B slapcat
 
143
with the
 
144
.BR slapd-bdb (5),
 
145
.BR slapd-hdb (5),
 
146
and
 
147
.BR slapd-null (5)
 
148
backends.
 
149
.SH EXAMPLES
 
150
To make a text backup of your SLAPD database and put it in a file called
 
151
.BR ldif ,
 
152
give the command:
 
153
.LP
 
154
.nf
 
155
.ft tt
 
156
        SBINDIR/slapcat -l ldif
 
157
.ft
 
158
.fi
 
159
.SH "SEE ALSO"
 
160
.BR ldap (3),
 
161
.BR ldif (5),
 
162
.BR slapadd (8),
 
163
.BR ldapadd (1),
 
164
.BR slapd (8)
 
165
.LP
 
166
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
 
167
.SH ACKNOWLEDGEMENTS
 
168
.so ../Project