1SLAPADD(8C) SLAPADD(8C)
2
3
4
6 slapadd - Add entries to a SLAPD database
7
9 /usr/sbin/slapadd [-b suffix] [-c] [-d debug-level] [-f slapd.conf]
10 [-F confdir] [-g] [-j lineno] [-l ldif-file] [-n dbnum]
11 [-o option[=value]] [-q] [-s] [-S SID] [-u] [-v] [-w]
12
14 Slapadd is used to add entries specified in LDAP Directory Interchange
15 Format (LDIF) to a slapd(8) database. It opens the given database
16 determined by the database number or suffix and adds entries corre‐
17 sponding to the provided LDIF to the database. Databases configured as
18 subordinate of this one are also updated, unless -g is specified. The
19 LDIF input is read from standard input or the specified file.
20
21 All files eventually created by slapadd will belong to the identity
22 slapadd is run as, so make sure you either run slapadd with the same
23 identity slapd(8) will be run as (see option -u in slapd(8)), or change
24 file ownership before running slapd(8).
25
26 Note: slapadd will also perform the relevant indexing whilst adding the
27 database if any are configured. For specfic details, please see slapin‐
28 dex(8).
29
31 -b suffix
32 Use the specified suffix to determine which database to add
33 entries to. The -b cannot be used in conjunction with the -n
34 option.
35
36 -c enable continue (ignore errors) mode.
37
38 -d debug-level
39 enable debugging messages as defined by the specified debug-
40 level; see slapd(8) for details.
41
42 -f slapd.conf
43 specify an alternative slapd.conf(5) file.
44
45 -F confdir
46 specify a config directory. If both -f and -F are specified,
47 the config file will be read and converted to config directory
48 format and written to the specified directory. If neither
49 option is specified, an attempt to read the default config
50 directory will be made before trying to use the default config
51 file. If a valid config directory exists then the default config
52 file is ignored. If dry-run mode is also specified, no conver‐
53 sion will occur.
54
55 -g disable subordinate gluing. Only the specified database will be
56 processed, and not its glued subordinates (if any).
57
58 -j lineno
59 Jump to the specified line number in the LDIF file before pro‐
60 cessing any entries. This allows a load that was aborted due to
61 errors in the input LDIF to be resumed after the errors are cor‐
62 rected.
63
64 -l ldif-file
65 Read LDIF from the specified file instead of standard input.
66
67 -n dbnum
68 Add entries to the dbnum-th database listed in the configuration
69 file. The -n cannot be used in conjunction with the -b option.
70 To populate the config database slapd-config(5), use -n 0 as it
71 is always the first database. It must physically exist on the
72 filesystem prior to this, however.
73
74 -o option[=value]
75 Specify an option with a(n optional) value. Possible generic
76 options/values are:
77
78 syslog=<subsystems> (see `-s' in slapd(8))
79 syslog-level=<level> (see `-S' in slapd(8))
80 syslog-user=<user> (see `-l' in slapd(8))
81
82 schema-check={yes|no}
83 value-check={yes|no}
84
85 The schema-check option toggles schema checking (default on);
86 the value-check option toggles value checking (default off).
87 The latter is incompatible with -q.
88
89 -q enable quick (fewer integrity checks) mode. Does fewer consistency checks
90 on the input data, and no consistency checks when writing the database.
91 Improves the load time but if any errors or interruptions occur the resulting
92 database will be unusable.
93
94 -s disable schema checking. This option is intended to be used when loading
95 databases containing special objects, such as fractional objects on a
96 partial replica. Loading normal objects which do not conform to
97 schema may result in unexpected and ill behavior.
98
99 -S SID Server ID to use in generated entryCSN. Also used for contextCSN
100 if -w is set as well. Defaults to 0.
101
102 -u enable dry-run (don't write to backend) mode.
103
104 -v enable verbose mode.
105
106 -w write syncrepl context information.
107 After all entries are added, the contextCSN
108 will be updated with the greatest CSN in the database.
109
111 Your slapd(8) should not be running when you do this to ensure consis‐
112 tency of the database.
113
114 slapadd may not provide naming or schema checks. It is advisable to
115 use ldapadd(1) when adding new entries into an existing directory.
116
118 To import the entries specified in file ldif into your slapd(8) data‐
119 base give the command:
120
121 /usr/sbin/slapadd -l ldif
122
124 ldap(3), ldif(5), slapcat(8), slapindex(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 SLAPADD(8C)