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]
10       [-fslapd.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)
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

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.
49
50       -d debug-level
51              Enable  debugging  messages  as  defined by the specified debug-
52              level; see slapd(8) for details.
53
54       -f slapd.conf
55              Specify an alternative slapd.conf(5) file.
56
57       -F confdir
58              specify a config directory.  If both -f and  -F  are  specified,
59              the  config  file will be read and converted to config directory
60              format and written  to  the  specified  directory.   If  neither
61              option  is  specified,  an  attempt  to  read the default config
62              directory will be made before trying to use the  default  config
63              file. If a valid config directory exists then the default config
64              file is ignored.
65
66       -g     disable subordinate gluing.  Only the specified database will be
67              processed, and not its glued subordinates (if any).
68
69       -H  URI
70              use  dn,  scope  and  filter  from  URI  to only handle matching
71              entries.
72
73       -l ldif-file
74              Write LDIF to specified file instead of standard output.
75
76       -n dbnum
77              Generate output for the dbnum-th database listed in the configu‐
78              ration  file. The config database slapd-config(5), is always the
79              first database, so use -n 0 to select it.
80
81              The -n cannot be used in conjunction with the -b option.
82
83       -o option[=value]
84              Specify an option with a(n optional)  value.   Possible  generic
85              options/values are:
86
87                     syslog=<subsystems>  (see `-s' in slapd(8))
88                     syslog-level=<level> (see `-S' in slapd(8))
89                     syslog-user=<user>   (see `-l' in slapd(8))
90
91
92       -s subtree-dn
93              Only  dump entries in the subtree specified by this DN.  Implies
94              -b subtree-dn if no -b or -n option is given.   Deprecated;  use
95              -H ldap:///subtree-dn instead.
96
97       -v     Enable verbose mode.
98

LIMITATIONS

100       For  some backend types, your slapd(8) should not be running (at least,
101       not in read-write mode) when you do this to ensure consistency  of  the
102       database.  It  is  always  safe  to  run slapcat with the slapd-bdb(5),
103       slapd-hdb(5), and slapd-null(5) backends.
104

EXAMPLES

106       To make a text backup of your SLAPD database  and  put  it  in  a  file
107       called ldif, give the command:
108
109            /usr/sbin/slapcat -l ldif
110

SEE ALSO

112       ldap(3), ldif(5), slapadd(8), ldapadd(1), slapd(8)
113
114       "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
115

ACKNOWLEDGEMENTS

117       OpenLDAP  Software  is developed and maintained by The OpenLDAP Project
118       <http://www.openldap.org/>.  OpenLDAP Software is derived from  Univer‐
119       sity of Michigan LDAP 3.3 Release.
120
121
122
123OpenLDAP 2.4.23                   2010/06/30                       SLAPCAT(8C)
Impressum