CHLOG2REPLOG(8C)

NAME
chlog2replog - convert an X.500 DSA-style changelog to an LDAP-style replication log

SYNOPSIS
ETCDIR/chlog2replog -r hostname:port [-r hostname:port ...] -d dn-suffix [-o output-file] < input-file

DESCRIPTION

chlog2replog is used to convert an X.500-style changelog to an LDAP-style replication log. It reads its standard input and writes standard output if no -o flag is given. If the -o flag is given, chlog2replog writes its output to the given file, following the same advisory locking mechanisms respected by the slurpd program. This makes it possible to use chlog2replog in a pipeline to produce input for slurpd.

OPTIONS

-r hostname:port
    This option specifies the hostname and port number to which updates should be propagated. chlog2replog will include one "replica: hostname:port" directive in each replication log entry it writes out for each -r option given. You may supply as many replica hostname:port options as you wish.

-d dn-suffix
    This option specifies an additional string to append to converted DNs (Distinguished Names) converted from the changelog file. The DNs in the changelog file will typically be partial DNs which omit the portion of the directory tree "above" the organizational root. For example, if your directory tree is rooted at o=University of Michigan, c=US, you will need to include the argument "-d ", o=University of Michigan, c=US".

-o output-file
    If given, this option specifies an output file to which converted replication log entries will be written. chlog2replog obeys the same file locking conventions used by slurpd, so that it is possible to use chlog2replog to "feed" changes from an X.500 DSA to slurpd. See the examples section, below, for more information.

EXAMPLES
To read the DSA-style changelog file changlelog and write on the standard output an LDAP-style replication log, appending ", o=University of Michigan, c=US" to all entry DNs, and including a replica: entry for host "ldapserver," port 389, give the command:

	ETCDIR/chlog2replog -d ", o=University of Michigan, c=US"
	-r ldapserver:389 < changelog

To do the same, but routing the output to the file "replog," using slurpd-compatible file-locking, give this command:

	ETCDIR/chlog2replog -d ", o=University of Michigan, c=US"
	-r ldapserver:389 -o replog < changelog

To continually read new changes from the file "changelog" and write them to the file "replog", give this command:

	tail +0f changelog  | ETCDIR/chlog2replog
	-d ", o=University of Michigan, c=US"
	-r ldapserver:389 -o replog < changelog

SEE ALSO
ldap(3), ldif(5), slurpd(8), slapd(8),

"The SLAPD and SLURPD Administrator's Guide"