LDAPviewer

LDIF Export Feature

The LDIF Export feature provides two functions:

  1. Export Selected Tree as LDIF The entire tree (or branch) starting from the user selected DN in the DIT Tree is exported to an LDIF file. To save the whole DIT, select the topmost DN (DIT root, suffix or base) entry (the LDIF dialog always confirms the user selected DN). To save only a spefific branch (a DIT subtree) the user should select the highest DN in the branch to be exported.

  2. Export Selected Entry as LDIF Only the single entry at the user selected DN is exported (no child entries are exported).

Notes:

  1. The LDIF Export reads the Entries using the Alias, Referral and return attributes properties for the DIT Window on which it is invoked. For example, if the LDIF Export is invoked on the Primary DIT Window the Alias, Referral and return attributes properties are taken from the Connection Profile, in the case of the Search DIT they are taken from the search filter.

  2. To create an LDIF that is capable of being loaded into a DIT, as a minimum, the return attributes must include the objectClass attribute and the mandatory attributes for all possible objectClasses saved during the LDIF operation.

Both Export Selected Tree as LDIF and Export Selected Entry as LDIF allow the saved entry/entries to be optionally renamed as shown in the LDIF Export Dialog.

Export LDIF Dialog

Selected DN shows the DN of the entry to be exported (if Export Selected Entry as LDIF was invoked) or the base DN of the entry tree to be exported (if Export Selected Tree as LDIF was invoked). If Selected DN is incorrect simply click Cancel in the dialog to terminate the operation.

Rename DN optionally allows the exported DNs to be changed. If no renaming is required leave this value unchanged and click OK to proceed with the LDIF Export. If a rename is required any valid DN may be entered or the existing DN may be edited as appropriate. Thus, in the screen above if dc=example,dc=net is to be exported as dc=example,dc=com then only the last dc=net should be edited to dc=com. Similarly, dc=example,dc=com could be replaced with o=mycorp,c=us or ou=groups could be replaced with, say, ou=entities. The rename is applied to all exported entry DNs (in the case of Export Selected Tree).

Note: The DN change is not applied to DNs within the entry, for example, member attributes (in a groupOfNames objectClass).

When the user selects the OK button a file dialog box is opened as shown:

Export LDIF File Selector

Select the appropriate directory and create or select a suitable file name to save the resulting LDIF and click the Save button. (Note: The directory location is saved and used as a base for subsequent LDIF menu items and commands.)

When a LDIF Export Selected Entry successfully completes a confirmation message is displayed on the status bar with the following format:

LDIF written for Entry [DN] to [directory/filename]

When a LDIF Export Selected Tree completes successfully an information message is displayed similar to the example shown below:

Export Tree LDIF Confirmation Message

The message confirms the base DN (as modified by any Rename) the file name and location as well as the number of entries saved to the LDIF. Click OK to dismiss the message.

In both cases the resulting LDIF may be displayed using the View LDIF item from the LDIF menu.

Note: Attributes which have NO-USER-MODIFICATION set in the attributeType definition (mostly operational attributes) are not saved to the LDIF even if they are visible in the entries being saved. This is because an LDIF containing attributes with NO-USER-MODIFICATION would fail if applied (imported) to any DIT.

© LV Project 2016. Creative Commons Attribution 4.0 International License.