The ldif-diff Command-Line Tool

Compare the contents of two files containing LDIF entries. The output will be an LDIF file containing the add, delete, and modify change records needed to convert the data in the source LDIF file into the data in the target LDIF file.

This tool works best with small LDIF files because it reads the entire contents of the source and target LDIF files into memory so they can be quickly compared. If you encounter an out of memory error while running the tool, you may need to increase the amount of memory available to the JVM used to invoke it.

The amount of memory available to the JVM may be customized by invoking the JVM with the '-Xms' and '-Xmx' arguments (which specify the initial and maximum amounts of memory that it may use, respectively). These arguments should be immediately followed (without any intervening space) by an integer and a unit to specify the amount of memory that may be used. The unit may be either 'm' to indicate that the size is in megabytes, or 'g' to indicate that it is in gigabytes. For example, '-Xms512m' indicates that the JVM should be given an initial heap size of 512 megabytes, while '-Xmx2g' indicates that it should be given a maximum heap size of two gigabytes.

When invoking the ldif-diff tool with the shell script or batch file included as part of the LDAP SDK, you may use the 'JAVA_ARGS' environment variable to specify the arguments to use when invoking the JVM.

Usage

ldif-diff {arguments}

Source LDIF Arguments

Target LDIF Arguments

Output LDIF Arguments

Content Arguments

Additional Arguments

Dependent Argument Sets

Exclusive Argument Sets

Examples

    ldif-diff --sourceLDIF actual.ldif --targetLDIF desired.ldif \
         --outputLDIF diff.ldif
    ldif-diff --sourceLDIF actual.ldif --targetLDIF desired.ldif \
         --outputLDIF diff.ldif --includeOperationalAttributes \
         --excludeNoUserModificationAttributes --nonReversibleModifications