Maintenance Commands ldifmerge(1M)
NAME
ldifmerge - create a LDIF file containing the differences
between two LDIF files
SYNOPSIS
ldifmerge -o original_file -n new_file [-m output_file]
DESCRIPTION
The ldifmerge utility reads two LDAP Directory Interchange
Format (LDIF) files and outputs LDIF which contained the
differences between the first two. It merges files by look-
ing to see which records have been added and also checks for
modifications. A modification can include added, removed,
or changed attributes.
The LDIF output is printed to standard output or to a file
using the -m option. The output contains changetypes which
indicate whether a record is being added, removed, or modi-
fied.
The output can then be read into a LDAP server using the
ldapmodify(1) command. The intended use of this utility is
to first use sam2ldif(1M) to generate a LDIF reprensentation
of the PC NetLink SAM database and use ldapsearch(1) to gen-
erate a LDIF representation of the LDAP database. As argu-
ments to this utility, the LDAP database LDIF file could be
considered the original file and the SAM LDIF file could be
considered the new LDIF file. The LDIF output by this util-
ity will create a LDIF file which, when read into the LDAP
server, will in effect synchronize the LDAP server to the
SAM database.
OPTIONS
The ldifmerge utility supports the following options:
-o original_file
Specifies the path of the original LDIF file.
-n new_file
Specifies the path of the new LDIF file.
-m output_file
Optional path of resulting LDIF file. If no path is
specified, output is printing to standard output.
EXAMPLES
The example below illustrates ldifmerge usage.
If original_file contains the following:
dn: uid=user,o=bar
fullname: John Doe
And new_file contains the following:
dn: uid=user,o=bar
fullname: Jane Doe
% ldifmerge -o original_file -n new_file
This example would output the following text:
dn: uid=user,o=bar
changetype: modify
replace: fullname
fullname: Jane Doe
SEE ALSO
sam2ldif(1M), ldif2sam(1M), ldapmodify(1), ldapsearch(1),
ldapadd(1), diff(1),