Import-ldif with append option

This topic has 5 replies, 4 voices, and was last updated 4 years, 10 months ago by JnRouvignac.

  • Author
  • #19523


    I want to export data from one OpenDJ server and import it to another OpenDJ server, which already contains some data. I see that in the older versions of Directory Services, there was an option ‘–append’ which appended data to the server. However, I am using DS 5.0 which only overwrites data, with no append option. How can I append new data, without erasing the existing data in the second OpenDJ server.

     Bill Nelson

    Rather than using import-ldif, consider using ldapmodify -a -f.

     Michelle Reagin


    If you believe that there may be some overlap in the entries being imported and you want the server receiving the imported data to keep the entries it has and ignore identical DNs in the import, then you would want to add the “-c” option to the ldapmodify command that Bill provided. That will tell ldapmodify to continue on error, the error being that an entry with an identical DN already exists.


    Thanks Bill. I have an ldif which is generated using export-ldif command. There are a few entries in my old server which are already present in my new server. ldapmodify would fail for any existing entry, without changing the exported ldif file.

    I was looking for any replacements for import-ldif with append option which consumes the exported ldif file. If there is no replacement for import-ldif with append option, I might consider using ldapmodify with a customised ldif file.


    Thanks Michelle and Bill! I think the -c option helps.



    OPENDJ-4108 (under development) is a proper replacement for import-ldif --append which will have the added bonus to work with replication.


    • This reply was modified 4 years, 10 months ago by JnRouvignac.
    • This reply was modified 4 years, 10 months ago by JnRouvignac.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?