This section describes the following conversion utilities used to convert LDIF to LDBM database format:
![]() |
ldif2ldbm |
![]() |
ldif2index |
![]() |
ldif2id2entry |
![]() |
ldif2id2children |
These utilities convert a database in LDAP Directory Interchange Format (LDIF) to an LDBM database suitable for use by slapd. Normally, you need only use ldif2ldbm. It invokes the other utilities as necessary. Occasionally, it may be necessary to invoke them directly. For example, to create a new index file for an existing database, use the ldif2index program. To do the reverse conversion, from LDBM to LDIF, use the ldbmcat command, described in "ldbmcat."
The parameters for these commands are:
-c
This option is used to create and specifically overwrite an existing directory.
-i ldifinputfile
This option specifies the location of the LDIF input file containing the database to convert.
-d debuglevel
Set the LDAP debugging level. Useful values of debuglevel for these commands are:
1 - Trace
2 - Packets
4 - Arguments
32 - Filters
128 - Access control
2048 - Parse To request more than one category of debugging information, add the masks. For example, to request trace and filter information, specify a debuglevel of 33.
-f slapdconfigfile
This option specifies the slapd configuration file. The default is /etc/opt/SUNWconn/ldap/current/slapd.conf.
-j numberofjobs
This option applies only to the ldif2ldbm utility. It specifies the number of processes that can run in parallel when doing the conversion. ldif2ldbm invokes several other utilities during the conversion process, most notably one invocation of ldif2index for each indexed attribute that appears in the LDIF input file. The -j option tells ldif2ldbm how many of these other utilities can run in parallel. Running several processes in parallel can speed up the conversion; however, it also consumes more disk, memory, and CPU resources. The default is to run only one process at a time.
To convert the file ldif.input into an LDBM database with indexes, as described in the slapd config file /etc/opt/SUNWconn/ldap/current/slapd.conf, type the following command:
% ldif2index -i ldif.input -f \ /opt/SUNWconn/ldap/current/slapd.conf
To do the same, but running two conversion subprocesses at a time, type this command:
% ldif2index -i ldif.input -f \ /opt/SUNWconn/ldap/current/slapd.conf -j 2