Using command line
You can issue the commands provided here to add a replication filter using command line.
About this task
Issue the following command to add a replication filter:
ldapadd –D cn=root –w root
dn: cn=replicationfilter,cn=localhost
objectclass: ibm-replicationfilter
ibm-replicationFilterAttr: (objectclass=person):(cn,sn,description)
ibm-replicationFilterAttr: (objectclass=printer):!(cn,color)
ibm-replicationFilterAttr: (objectclass=*):(*)
The above example states that for entries of type “person”, the attributes cn, sn, and description will be sent to the replica. The rest of the attributes present in the entry will not be sent. For entries of type “printer”, all attributes except cn and color will be sent. For the remaining entries, all attributes will be sent.Now, modify the replication agreement to add the DN of the filter entry. To do this, issue the following command:
ldapmodify –D cn=root –w root
dn: cn=replica1,ibm-replicaServerId=master-uuid,ibm-replicaGroup=default,o=sample
changetype: modify
add: ibm-replicationFilterDN
ibm-replicationFilterDN: cn=replicationfilter,cn=localhost