1SLAPCAT(8C) SLAPCAT(8C)
2
3
4
6 slapcat - SLAPD database to LDIF utility
7
9 /usr/sbin/slapcat [-afilter] [-bsuffix] [-c] [-ddebug-level]
10 [-fslapd.conf] [-Fconfdir] [-g] [-HURI] [-lldif-file] [-ndbnum] [-oop‐
11 tion[=value]] [-ssubtree-dn] [-v]
12
14 Slapcat is used to generate an LDAP Directory Interchange Format (LDIF)
15 output based upon the contents of a slapd(8) database. It opens the
16 given database determined by the database number or suffix and writes
17 the corresponding LDIF to standard output or the specified file. Data‐
18 bases configured as subordinate of this one are also output, unless -g
19 is specified.
20
21 The entry records are presented in database order, not superior first
22 order. The entry records will include all (user and operational)
23 attributes stored in the database. The entry records will not include
24 dynamically generated attributes (such as subschemaSubentry).
25
26 The output of slapcat is intended to be used as input to slapadd(8).
27 The output of slapcat cannot generally be used as input to ldapadd(1)
28 or other LDAP clients without first editing the output. This editing
29 would normally include reordering the records into superior first order
30 and removing no-user-modification operational attributes.
31
33 -a filter
34 Only dump entries matching the asserted filter. For example
35
36 slapcat -a \
37 "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
38
39 will dump all but the "ou=People,dc=example,dc=com" subtree of
40 the "dc=example,dc=com" database. Deprecated; use -H
41 ldap:///???(filter) instead.
42
43 -b suffix
44 Use the specified suffix to determine which database to generate
45 output for. The -b cannot be used in conjunction with the -n
46 option.
47
48 -c Enable continue (ignore errors) mode. Multiple occorrences of
49 -c make slapcat(8) try harder.
50
51 -d debug-level
52 Enable debugging messages as defined by the specified debug-
53 level; see slapd(8) for details.
54
55 -f slapd.conf
56 Specify an alternative slapd.conf(5) file.
57
58 -F confdir
59 specify a config directory. If both -f and -F are specified,
60 the config file will be read and converted to config directory
61 format and written to the specified directory. If neither
62 option is specified, an attempt to read the default config
63 directory will be made before trying to use the default config
64 file. If a valid config directory exists then the default config
65 file is ignored.
66
67 -g disable subordinate gluing. Only the specified database will be
68 processed, and not its glued subordinates (if any).
69
70 -H URI
71 use dn, scope and filter from URI to only handle matching
72 entries.
73
74 -l ldif-file
75 Write LDIF to specified file instead of standard output.
76
77 -n dbnum
78 Generate output for the dbnum-th database listed in the configu‐
79 ration file. The config database slapd-config(5), is always the
80 first database, so use -n 0 to select it.
81
82 The -n cannot be used in conjunction with the -b option.
83
84 -o option[=value]
85 Specify an option with a(n optional) value. Possible generic
86 options/values are:
87
88 syslog=<subsystems> (see `-s' in slapd(8))
89 syslog-level=<level> (see `-S' in slapd(8))
90 syslog-user=<user> (see `-l' in slapd(8))
91
92 ldif-wrap={no|<n>}
93
94 n is the number of columns allowed for the LDIF output
95 (n equal to 0 uses the default, corresponding to 78).
96 The minimum is 2, leaving space for one character and one
97 continuation character.
98 Use no for no wrap.
99
100 -s subtree-dn
101 Only dump entries in the subtree specified by this DN.
102 Implies -b subtree-dn if no
103 -b
104 or
105 -n
106 option is given.
107 Deprecated; use -H ldap:///subtree-dn instead.
108
109 -v Enable verbose mode.
110
112 For some backend types, your slapd(8) should not be running (at least,
113 not in read-write mode) when you do this to ensure consistency of the
114 database. It is always safe to run slapcat with the slapd-bdb(5),
115 slapd-hdb(5), and slapd-null(5) backends.
116
118 To make a text backup of your SLAPD database and put it in a file
119 called ldif, give the command:
120
121 /usr/sbin/slapcat -l ldif
122
124 ldap(3), ldif(5), slapadd(8), ldapadd(1), slapd(8)
125
126 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
127
129 OpenLDAP Software is developed and maintained by The OpenLDAP Project
130 <http://www.openldap.org/>. OpenLDAP Software is derived from Univer‐
131 sity of Michigan LDAP 3.3 Release.
132
133
134
135OpenLDAP 2.4.44 2016/02/05 SLAPCAT(8C)