Data Import
You can use the methods listed here to import data from an LDAP Directory Interchange Format (LDIF) file to the IBM® Verify Directory server container.
Client Tool
You can use the ldapadd client tool from any system where it’s available to add data to the IBM Verify Directory server container from an LDIF file. The ldapadd tool adds entries one at a time, so it’s slower than server-side tools. For this reason, use ldapadd only when you need to add fewer than 10,000 entries. Data added with the ldapadd client tool is replicated by default. If you add data to an IBM Verify Directory server that’s part of a replication environment, all added data is automatically replicated to all its replicas.
idsldapadd -h <hostname> -p <port> -D <admin_dn> -w <admin_pw> -i
</path/to/file_name.ldif>
If it is not desired to replicate all added data to the IBM Verify Directory server replicas, then you can run the ldapadd with the -l flag, as shown below:
idsldapadd -h <hostname> -p <port> -D <admin_dn> -w <admin_pw> -l -i
</path/to/file_name.ldif>
For more information about the idsldapadd client utility, see idsldapadd.
Server Tool:
If you need to add more than 10,000 entries to the IBM Verify Directory server container, use one of the server tools to import the data. Server tools are much faster than the ldapadd client tool, which adds entries one at a time and would take too long for large datasets.
idsbulkload:
If the LDIF file you want to import doesn’t contain any entries that already exist in the IBM Verify Directory server container, the recommended method is to import the data through the seed container. Follow the steps described in Migration from Software. The seed container uses the idsbulkload server tool to import data.
The idsbulkload tool is the fastest of all IVD tools. It performs data validation by checking whether the distinguished name (DN) of the entries to be imported already exists on the IBM Verify Directory server. If any DN already exists, an error occurs and the data import fails.
idsbulkload verifies that:
- All object classes and attributes are defined.
- Attributes specified for each entry comply with the list of required and allowed attributes in the object class definition.
- Binary attribute values are in the correct 64-bit encoded form.
Data imported with the idsbulkload server tool isn’t replicated. If you want the data to be available on multiple IBM Verify Directory replica servers, you must run the idsbulkload utility on each replica.
idsbulkload manually in the IBM Verify Directory server container instead of through the seed container. To do this, add the ISVD_DELAY_EXIT environment variable to the IBM Verify Directory server container definition, as shown below:
# Environment definition.
env:
- name: YAML_CONFIG_FILE
value: /var/isvd/config/config.yaml
- name: ISVD_DELAY_EXIT
value: "YES"
This will allow you to stop the IBM Verify Directory server without getting the container restarted. After defining the ISVD_DELAY_EXIT environment variable, stop the IVD server:
$ ibmslapd -I idsldap -k
Then, you can import the data with the idsbulkload server tool:
$ idsbulkload -I idsldap -i </path/to/file_name.ldif> -n
After you successfully load the data, remove the ISVD_DELAY_EXIT environment variable from the IBM Verify Directory server container definition and restart the container.
For more information about the idsbulkload server utility, see idsbulkload.
idsldif2db:
If the LDIF file you want to import contains entries that already exist in the IBM Verify Directory server container, use the idsldif2db server tool to import the data. Because idsldif2db does not perform data validation, it skips entries with a DN that already exists in the IBM Verify Directory server. However, this also means it does not perform schema validation on the data to be imported, such as checking whether the attributes specified for each entry comply with the required and allowed attributes in the object class definition.
Data imported with the idsldif2db server tool is replicated by default. If you import data using idsldif2db on an IBM Verify Directory server that’s part of a replication environment, all imported data is automatically replicated to all replicas.
The idsldif2db server tool can only be run from the IBM Verify Directory server container. You must run it manually by adding the ISVD_DELAY_EXIT environment variable to the IBM Verify Directory server container definition, as shown below:
# Environment definition.
env:
- name: YAML_CONFIG_FILE
value: /var/isvd/config/config.yaml
- name: ISVD_DELAY_EXIT
value: "YES"
This will allow you to stop the IBM Verify Directory server without restarting the container. After defining the ISVD_DELAY_EXIT environment variable, stop the IBM Verify Directory server:
$ ibmslapd -I idsldap -k
idsldif2db server tool:
$ idsldif2db -I idsldap -i </path/to/file_name.ldif>
$ idsldif2db -I idsldap -i </path/to/file_name.ldif> -r no
After you successfully import the data, remove the ISVD_DELAY_EXIT environment variable from the IBM Verify Directory server container definition and restart the container.
For more information about the idsbulkload server utility, see idsldif2db.