This article has been archived and is no longer maintained by ForgeRock.
Do not compress, tamper with, or otherwise alter changelog database files directly unless specifically instructed to do so by a qualified ForgeRock technical support engineer. External changes to changelog database files can render them unusable by the server. By default, changelog database files are located under the /path/to/ds/changelogDb directory.
You can enable the external changelog across a single server as follows:
- For DS 5 and later, you should refer to the documentation for this process: Administration Guide › To Enable the External Change Log.
- For OpenDJ 3.x, you should refer to the steps detailed below.
If you want to enable replication across multiple servers, you should use dsreplication enable instead as described in Reference › dsreplication enable. When you enable replication across multiple servers, the external change log is enabled by default.
You can enable the external changelog on a single OpenDJ server as follows:
- Create your server as the replication server using the dsconfig create-replication-server command. For example: $ ./dsconfig create-replication-server --provider-name "Multimaster Synchronization" --set replication-port:8989 --set replication-server-id:2 --type generic --hostName ldap.example.com --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --no-prompt --trustAll
- Create the replication domain for your server using the dsconfig create-replication-domain command. For example: $ ./dsconfig create-replication-domain --provider-name "Multimaster Synchronization" --set base-dn:ou=people,dc=example,dc=com --set replication-server:localhost:8989 --set server-id:3 --type generic --domain-name example_com --hostName ldap.example.com --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --no-prompt --trustAll
Searching the external changelog
Once the external change log is enabled, you can search it using the ldapsearch command. You should include the ECL Cookie Control (126.96.36.199.4.1.26027.1.5.4) as this is the optimized way to search the external changelog. The following example command also includes ; in the Cookie Control; this indicates the cookie is unknown, which means the search starts from the first change. You can replace this with the string value associated with the last change received if you want to continue from that point. You can find this string value from the ChangeLogCookie operational attribute (if requested) or the comment before the change itself. See Administration Guide › To Use the External Change Log for further information.
For example:$ ./ldapsearch --bindDN "cn=Directory Manager" --bindPassword password --hostName ldap.example.com --port 1389 --control "188.8.131.52.4.1.26027.1.5.4:false:;" --baseDN "cn=changelog" '(objectclass=*)'