---
name: "chlog2replog"
section: "8"
platform: "linux"
package: "openldapd"
version: "1:1.2.12-1"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/chlog2replog"
---

# chlog2replog(8)

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

## NAME

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

## SYNOPSIS

**/usr/sbin/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:

```
	/usr/sbin/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:

```
	/usr/sbin/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  | /usr/sbin/chlog2replog
	-d ", o=University of Michigan, c=US"
	-r ldapserver:389 -o replog < changelog
```

## SEE ALSO

[**ldap**(3)](/ldap/3.md), [**ldif**(5)](/ldif/5.md), [**slurpd**(8)](/slurpd/8.md), [**slapd**(8)](/slapd/8.md),

"The SLAPD and SLURPD Administrator's Guide"

## ACKNOWLEDGEMENTS

**OpenLDAP** is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). **OpenLDAP** is derived from University of Michigan LDAP 3.3 Release.
