Previous Topic: ldif2dxc Tool—Convert Schema from LDIF to CA Directory Format

Next Topic: ldifsort Tool—Sort LDIF Records

ldifdelta Tool—Calculate the Difference Between LDIF Files

Use the ldifdelta tool to calculate the change, or delta, between two LDIF files. The ldifdelta program is an offline directory synchronization tool based on the LDAP directory interchange format. You can use ldifdelta to fully or partially synchronize directories.

You must do two things before using the ldifdelta tool:

  1. Get the two LDIF files you want to compare, oldfile and newfile, say.

    To do this, use the DXsearch tool (with the -L option) or the DXdumpdb tool.

  2. Sort the LDIF files using the ldifsort tool.

ldifdelta can produce an output file, which, is a file containing LDIF change records. You can use the DXmodify tool to apply these LDIF change records to the sorted oldfile, and so update it to newfile.

The ldifdelta tool has the following limitations:

The ldifdelta tool ignores the following operational attributes:

This command has the following format:

ldifdelta [-x] [-v] -S dsaname oldfile newfile [outfile]

Example: Using ldifdelta and ldifsort Together

This example makes the old directory the same as the reference directory:

dxsearch -L -h oldhost "(oc=*)" > old.ldif
dxsearch -L -h referencehost "(oc=*)" > ref.ldif
ldifsort old.ldif old_sorted.ldif
ldifsort ref.ldif ref_sorted.ldif
ldifdelta -x -S DSA1 old_sorted.ldif ref_sorted.ldif | dxmodify -h oldhost


Copyright © 2009 CA. All rights reserved. Email CA about this topic