2.3.15.2. cn=import
An LDIF file or multiple LDIF files can be imported through the command line by creating a special
task entry which defines the parameters of the task and initiates the task. As soon as the task is
complete, the task entry is removed from the directory.
The cn=import entry is a container entry for import task operations. The cn=import entry itself
has no attributes, but each of the task entries within this entry, such as cn=task_ID, cn=import,
cn=tasks, cn=config, uses the following attributes to define the import task.
An import task entry under cn=import must contain the LDIF file to import (in the
attribute) and the name of the instance into which to import the file (in the
Additionally, it must contain a unique cn to identify the task. For example:
dn: cn=example import, cn=import, cn=tasks, cn=config
objectclass: extensibleObject
cn: example import
nsFilename: /home/files/example.ldif
nsInstance: userRoot
As the import operation runs, the task entry will contain all of the server-generated task attributes listed
Section 2.3.15.1, "Task Invocation Attributes for Entries under
in
There are some optional attributes which can be used to refine the import operation, similar to the
options for the ldif2db and ldif2db.pl scripts:
• nsIncludeSuffix, which is analogous to the -s option to specify the suffix to import
• nsExcludeSuffix, analogous to the -x option to specify a suffix or subtree to exclude from the import
• nsImportChunkSize, analogous to the -c option to override starting a new pass during the import
and merge the chunks
• nsImportIndexAttrs, which sets whether to import attribute indexes (with no corollary in the script
options)
• nsUniqueIdGenerator, analogous to the -g option to generate unique ID numbers for the entries
• nsUniqueIdGeneratorNamespace, analogous to the -G option to generate a unique, name-based ID
for the entries
nsFilename
The nsFilename attribute contains the path and filenames of the LDIF files to import into the
Directory Server instance. To import multiple files, add multiple instances of this attribute. For example:
nsFilename: file1.ldif
nsFilename: file2.ldif
Parameter
Entry DN
Valid Values
Default Value
Syntax
nsInstance
cn=tasks".
Description
cn=task_name, cn=import, cn=tasks, cn=config
Any string
Case-exact string, multi-valued
cn=tasks
nsFilename
attribute).
107
Need help?
Do you have a question about the DIRECTORY SERVER 8.1 and is the answer not in the manual?
Questions and answers