Data Governance Server Documentation Index
Command-Line Tool Reference Home

ldif-diff

Description
Examples
Arguments

Description

Compare the contents of two LDIF files, with the output being an LDIF file needed to bring the source file in sync with the target.

The 'ldif-diff' tool should not be used on very large LDIF files because it stores the contents of each file in memory while computing the difference. The memory used by ldif-diff can be customized by editing the ldif-diff.java-args setting in the config/java.properties file and running dsjavaproperties.

Examples

Compare actual.ldif to expected.ldif. The changes needed to bring actual.ldif in-sync with expected.ldif are written to STDOUT:
ldif-diff --sourceLDIF actual.ldif --targetLDIF expected.ldif


Compare actual.ldif to expected.ldif. The changes needed to bring actual.ldif in-sync with expected.ldif are written to a file. Operational attributes are include in the output along with the standard user attributes, except those that the server would deny attempted modification:
ldif-diff --sourceLDIF actual.ldif --targetLDIF expected.ldif \
     --outputLDIF result.ldif --includeOperational --excludeNoUserModification

Arguments

-V
--version

Description Display Data Governance Server version information

-H
--help

Description Display general usage information

--help-debug

Description Display help for using debug options
Advanced Yes

-s {file}
--sourceLDIF {file}

Description LDIF file to use as the source data
Required Yes
Multi-Valued No

--sourceEncryptionPassphraseFile {file}

Description The path to a file that contains the encryption passphrase needed to decrypt the source LDIF file if it is encrypted. If the source LDIF file is encrypted and this argument is not provided, then the tool will interactively prompt for the encryption passphrase. If a passphrase file is provided, then it must contain exactly one line that consists entirely of the passphrase
Required No
Multi-Valued No

-t {file}
--targetLDIF {file}

Description LDIF file to use as the target data
Required Yes
Multi-Valued No

--targetEncryptionPassphraseFile {file}

Description The path to a file that contains the encryption passphrase needed to decrypt the target LDIF file if it is encrypted. If the target LDIF file is encrypted and this argument is not provided, then the tool will interactively prompt for the encryption passphrase. If a passphrase file is provided, then it must contain exactly one line that consists entirely of the passphrase
Required No
Multi-Valued No

-o {file}
--outputLDIF {file}

Description File to which the output should be written
Required No
Multi-Valued No

--compressOutput

Description GZIP-Compress the data written to the output LDIF file

--encryptOutput

Description Encrypt the data written to the output LDIF file. If the --targetEncryptionPassphraseFile argument is provided, then that passphrase will be used to encrypt the data; otherwise, the tool will interactively prompt for the passphrase

--outputEncryptionPassphraseFile {file}

Description The path to a file that contains the encryption passphrase needed to encrypt the output LDIF file if the --encryptOutput argument is provided. If the output is to be encrypted but no passphrase file is provided, then the tool will interactively prompt for the passphrase. If a passphrase file is given, then it must contain exactly one line that consists entirely of the passphrase
Required No
Multi-Valued No

-O
--overwriteExisting

Description Any existing output file should be overwritten rather than appending to it

-i
--includeOperational

Description Operational attributes will also be compared in addition to user attributes

-e
--excludeNoUserModification

Description Attributes marked with the NO-USER-MODIFICATION option in the schema will be excluded from comparison

-S
--singleValueChanges

Description Each attribute-level change should be written as a separate modification per attribute value rather than one modification per entry

--stripTrailingSpaces

Description Strip out any illegal trailing spaces contained in entries rather than rejecting those entries