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.  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 op‐
62              tion is specified, an attempt to read the default config  direc‐
63              tory  will be made before trying to use the default config file.
64              If a valid config directory exists then the default config  file
65              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  en‐
72              tries.
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

LIMITATIONS

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), slapd-mdb(5), and slapd-null(5) backends.
116

EXAMPLES

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

SEE ALSO

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

ACKNOWLEDGEMENTS

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