1SLAPCAT(8C)                                                        SLAPCAT(8C)
2
3
4

NAME

6       slapcat - SLAPD database to LDIF utility
7

SYNOPSIS

9       /usr/sbin/slapcat  [-afilter]  [-bsuffix]  [-c]  [-ddebug-level]  [-fs‐
10       lapd.conf] [-Fconfdir]  [-g]  [-HURI]  [-lldif-file]  [-ndbnum]  [-oop‐
11       tion[=value]] [-ssubtree-dn] [-v]
12

DESCRIPTION

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) at‐
23       tributes 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

OPTIONS

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. By default, the first database that supports the re‐
46              quested  operation is used. The -b cannot be used in conjunction
47              with the -n option.
48
49       -c     Enable continue (ignore errors) mode.  Multiple  occurrences  of
50              -c make slapcat(8) try harder.
51
52       -d debug-level
53              Enable  debugging  messages  as  defined by the specified debug-
54              level; see slapd(8) for details.
55
56       -f slapd.conf
57              Specify an alternative slapd.conf(5) file.
58
59       -F confdir
60              specify a config directory.  If both -f and  -F  are  specified,
61              the  config  file will be read and converted to config directory
62              format and written to the specified directory.  If  neither  op‐
63              tion  is specified, an attempt to read the default config direc‐
64              tory will be made before trying to use the default config  file.
65              If  a valid config directory exists then the default config file
66              is ignored.
67
68       -g     disable subordinate gluing.  Only the specified database will be
69              processed, and not its glued subordinates (if any).
70
71       -H  URI
72              use  dn,  scope  and filter from URI to only handle matching en‐
73              tries.
74
75       -l ldif-file
76              Write LDIF to specified file instead of standard output.
77
78       -n dbnum
79              Generate output for the dbnum-th database listed in the configu‐
80              ration  file. The config database slapd-config(5), is always the
81              first database, so use -n 0 to select it.
82
83              The -n cannot be used in conjunction with the -b option.
84
85       -o option[=value]
86              Specify an option with a(n optional)  value.   Possible  generic
87              options/values are:
88
89                     syslog=<subsystems>  (see `-s' in slapd(8))
90                     syslog-level=<level> (see `-S' in slapd(8))
91                     syslog-user=<user>   (see `-l' in slapd(8))
92
93                     ldif_wrap={no|<n>}
94
95              n is the number of columns allowed for the LDIF output
96              (n equal to 0 uses the default, corresponding to 78).
97              The minimum is 2, leaving space for one character and one
98              continuation character.
99              Use no for no wrap.
100
101       -s subtree-dn
102              Only dump entries in the subtree specified by this DN.
103              Implies -b subtree-dn if no
104              -b
105              or
106              -n
107              option is given.
108              Deprecated; use -H ldap:///subtree-dn instead.
109
110       -v     Enable verbose mode.
111

LIMITATIONS

113       For  some backend types, your slapd(8) should not be running (at least,
114       not in read-write mode) when you do this to ensure consistency  of  the
115       database.  It  is always safe to run slapcat with the slapd-mdb(5), and
116       slapd-null(5) backends.
117

EXAMPLES

119       To make a text backup of your SLAPD database  and  put  it  in  a  file
120       called ldif, give the command:
121
122            /usr/sbin/slapcat -l ldif
123

SEE ALSO

125       ldap(3), ldif(5), slapadd(8), ldapadd(1), slapd(8)
126
127       "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
128

ACKNOWLEDGEMENTS

130       OpenLDAP  Software  is developed and maintained by The OpenLDAP Project
131       <http://www.openldap.org/>.  OpenLDAP Software is derived from the Uni‐
132       versity of Michigan LDAP 3.3 Release.
133
134
135
136OpenLDAP 2.6.3                    2022/07/14                       SLAPCAT(8C)
Impressum