| Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Copy To LDIF (DB2LDIF) command is used to copy the directory contents of a Directory Server instance to a LDAP Data Interchange Format (LDIF) file. The Directory Server provides a Lightweight Directory Access Protocol (LDAP) server on IBM i.
Restriction: You must do or satisfy one of the following conditions to use this command:
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| INSTANCE | Instance | Name, QUSRDIR | Optional, Positional 2 |
| LDIFSTMF | LDIF stream file | Path name | Required, Positional 1 |
| ADMIN | Administrator | Element list | Optional |
| Element 1: Distinguished name | Character value | ||
| Element 2: Password | Character value | ||
| SUBTREE | Subtree distinguished name | Character value, *ALL | Optional |
| LOCALHOST | Copy cn=localhost | *NOCOPY, *COPY | Optional |
| PWDPOLICY | Copy cn=pwdpolicy | *NOCOPY, *COPY | Optional |
| NESTRPLC | Copy nested replication | *COPY, *NOCOPY | Optional |
| OPRATR | Copy operational attributes | *COPY, *NOCOPY | Optional |
| PASSPHRASE | Passphrase | Character value | Optional |
| ENCSALT | Encryption salt | Character value | Optional |
| FILTERDN | Filter distinguished name | Character value | Optional |
| FILTERCMT | Filter comments | Character value | Optional |
| Top |
Specifies the Directory Server instance whose directory entries are to be copied.
| Top |
Specifies the integrated file system path to the LDAP Data Interchange Format (LDIF) stream file.
This is a required parameter.
| Top |
Specifies the Directory Server administrator. If not specified, the user must have all object (*ALLOBJ) and input/output system configuration (*IOSYSCFG) special authorities.
Element 1: Distinguished name
Element 2: Password
| Top |
Specifies the distinguished name (DN) of the root of a directory subtree to copy to the LDAP Data Interchange Format (LDIF) stream file. This object, and all descendant objects will be copied.
| Top |
Specifies whether data located under the distinguished name cn=localhost is copied to the LDAP Data Interchange Format (LDIF) stream file.
| Top |
Specifies whether data located under the distinguished name cn=pwdpolicy is copied to the LDAP Data Interchange Format (LDIF) stream file.
| Top |
Specifies whether nested replication contexts are copied to the LDAP Data Interchange Format (LDIF) stream file. For example, if a directory contains the replication contexts o=acme and cn=external users,o=acme, this option can be used to copy data under the distinguished name o=acme while excluding all entries under the distinguished name cn=external users,o=acme.
| Top |
Specifies whether the following four operational attributes are copied to the LDAP Data Interchange Format (LDIF) stream file:
| Top |
Specifies the Advanced Encryption Standard (AES) passphrase to be used to encrypt any encrypted information stored in the LDAP Data Interchange Format (LDIF) stream file. This passphrase must match the passphrase used by the Directory Server instance that will copy the information from this LDIF stream file. This should only be specified if the target Directory Server instance is using AES encryption to encrypt data.
! # $ @ [ \ ] ^ ` { } | ~
" % & ' ( ) * + , - . / ? > = < ; : _
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9
| Top |
Specifies the Advanced Encryption Standard (AES) salt to be used to encrypt any encrypted information stored in the LDAP Data Interchange Format (LDIF) stream file. The encryption salt must match the encryption salt used by the Directory Server instance that will copy the information from the LDIF stream file created by the command. This should only be specified if the target Directory Server instance is using AES encryption to encrypt data.
! # $ @ [ \ ] ^ ` { } | ~
" % & ' ( ) * + , - . / ? > = < ; : _
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9
| Top |
Specifies a filter DN to be used as a filter for objectclasses and attributes.
| Top |
Specified some comments to be added into the LDIF file.
| Top |
Example 1: Copy Entire QUSRDIR Directory
DB2LDIF INSTANCE(QUSRDIR) LDIFSTMF('/ldap/qusrdir.ldif')
This command copies the entries from the Directory Server directory for the QUSRDIR instance to the qusrdir.ldif stream file in the ldap directory. The user running the command this way must have all object (*ALLOBJ) and input/output system configuration (*IOSYSCFG) special authorities.
Example 2: Copy the o=ibm Subtree Only
DB2LDIF INSTANCE(QUSRDIR) LDIFSTMF('/ldap/ibmsubtree.ldif')
SUBTREE('o=ibm') ADMIN('cn=admin' 'secret')
This command copies the o=ibm subtree entries from the Directory Server directory for the QUSRDIR instance to the ibmsubtree.ldif stream file in the ldap directory.
Example 3: Copy the cn=localhost Entries
DB2LDIF INSTANCE(DOGGIES)
LDIFSTMF('/ldap/includelocal.ldif')
SUBTREE(*ALL) LOCALHOST(*COPY)
ADMIN('cn=fluffy' 'poodle')
This command copies the entries from the Directory Server directory for the DOGGIES instance including the entries in cn=localhost to the includelocal.ldif stream file in the ldap directory.
| Top |
*ESCAPE Messages
| Top |