Importing an LDIF file
Use this information to import an LDAP Data Interchange Format (LDIF) file.
You can transfer information between different Directory Servers by using LDAP Data Interchange Format (LDIF) files. The import tool (and the corresponding QgldImportLdif API) are used to add new entries to the directory. The import tool cannot be used to change or delete entries, and the LDIF file must use the directory content style, rather than the change record style LDIF records. If the input LDIF file contains the changetype directives used in change record style LDIF records, the changetype line is interpreted as another attribute and the entry will not be added to the directory.
In typical usage, the entire directory, or a subtree of the directory, is exported from one server using the export tool (or the QgldExportLdif API), and then imported into another server.
The export and import tools are not equivalent to using the ldapsearch and ldapadd command line utilities. The export tool includes several operational attributes (such as access control information, and entry creation timestamps) not normally returned by ldapsearch, while the import tool can set attributes that cannot normally be set by a client application such as ldapadd. The ldapadd utility can be used with the -k option (server administration control) to load these files.
Before you begin this procedure, transfer the LDIF file to your system as a stream file.
To import an LDIF file to the Directory Server, take these steps:
- If the directory server is started, stop it. See Starting the Directory Server for information about stopping the directory server.
- In iSeries™ Navigator, expand Network.
- Expand Servers.
- Click TCP/IP.
- Right-click IBM Directory Server and select Tools, then Import File.
Optionally you can have the server replicate the newly imported data when it is next started by selecting Replicate imported data. This is useful when adding new entries to an existing directory tree on a master server. If you are importing data to initialize a replica (or peer) server, typically you will not want to have the data replicated, as it might already exist on the servers for which this server is a supplier.
You can also use the ldapadd utility to import LDIF files.
Parent topic:
General administration tasks
Related reference
LDAP data interchange format (LDIF)
ldapmodify and ldapadd