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:
To do this, use the DXsearch tool (with the -L option) or the DXdumpdb 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:
It does not attempt to interpret the nature or contents of the file that the URL references.
You cannot compare LDIF change files.
The ldifdelta tool ignores the following operational attributes:
This command has the following format:
ldifdelta [-x] [-v] -S dsaname oldfile newfile [outfile]
Ignores X.500 and DXserver operational attributes.
Runs in verbose mode.
Specifies the DSA server containing schema definitions.
Note: The DSA name is only used for schema checking. This does not imply that the LDIF and DSA name used are linked in any way.
Specifies the outdated file to produce the delta for.
Specifies the more recent file to compare against oldfile.
(Optional) Specifies the output file containing the differences between newfile and oldfile.
If you do not specify this file, ldifdelta produces its output to the standard output.
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 |