15.10. Removing a Directory Server Instance from the Replication Topology In certain situations, such as hardware outages or structural changes, administrators want to remove Directory Server instances from a replication topology. This section explains the details about removing an instance. 15.10.1. Removing a Consumer or Hub from the Replication Topology To remove a consumer or hub from the replication topology: If the host to remove is a hub and also a supplier for other servers in the topology, configure other suppliers or hubs to replicate data to these servers. If these servers have no other supplier configured and you remove the hub, these servers become isolated from the replication topology. For details about configuring replication, see: Section 15.2, "Single-supplier Replication" Section 15.3, "Multi-Supplier Replication" Section 15.4, "Cascading Replication" On the host to remove, set the database into read-only mode to prevent any updates: On all suppliers that have a replication agreement with the host to remove, delete the replication agreements. For example: On the consumer or hub to remove disable replication for all suffixes. For example: Disabling replication automatically deletes all replication agreements for this suffix on this server. 15.10.2. Removing a Supplier from the Replication Topology Removing a supplier cleanly from the replication topology is more complex than removing a consumer or hub. This is because every supplier in the topology stores information about other suppliers, and they retain that information even if a supplier suddenly becomes unavailable. Directory Server maintains information about the replication topology in a set of meta data called the replica update vector (RUV). The RUV contains information about the supplier, such as its ID, URL, latest change state number (CSN) on the local server, and the CSN of the first change. Both suppliers and consumers store RUV information, and they use it to control replication updates. To remove a supplier cleanly, you must remove its meta data along with the configuration entries. If the replica to be removed is also a supplier for other servers in the topology, configure other suppliers or hubs to replicate data to these servers. If these servers have no other supplier configured and you remove the supplier, these servers become isolated from the replication topology. For details about configuring replication, see: Section 15.2, "Single-supplier Replication" Section 15.3, "Multi-Supplier Replication" Section 15.4, "Cascading Replication" On the supplier to remove: Set the database into read-only mode to prevent any updates. For details, see Section 2.2.2.1, "Setting a Database in Read-Only Mode" . Wait until all other servers in the topology received all data from this supplier. To verify, ensure that the CSN on other servers is equal or greater than the CSN on the supplier to remove. For example: Display the replica ID: In this example, the replica ID is 1 . Remember your replica ID for the last step of this procedure. On all suppliers that have a replication agreement with the replica to remove, delete the replication agreements. For example: On the replica to remove, disable replication for all suffixes. For example: Disabling replication automatically deletes all replication agreements for this suffix on this server. On one of the remaining suppliers in the topology, clean the RUVs for the replica ID. For example: The command requires to specify the replica ID displayed in an earlier step of this procedure.

Commands:
ldapmodify -D "cn=Directory Manager" -W -p 389 -h host-to-remove.example.com -x dn: cn=userRoot,cn=ldbm database,cn=plugins,cn=config changetype: modify replace: nsslapd-readonly nsslapd-readonly: on
dsconf -D "cn=Directory Manager" ldap://server.example.com repl-agmt delete --suffix="dc=example,dc=com" agreement_name
dsconf -D "cn=Directory Manager" ldap:// host-to-remove.example.com replication disable --suffix=" dc=example,dc=com "
ds-replcheck online -D "cn=Directory Manager" -w password -m ldap://replica-to-remove.example.com:389 -r ldap://server.example.com:389 -b dc=example,dc=com ================================================================================ Replication Synchronization Report (Tue Mar 5 09:46:20 2019) ================================================================================ Database RUV's ===================================================== Supplier RUV: {replica 1 ldap://replica-to-remove.example.com:389} 5c7e8927000100010000 5c7e89a0000100010000 {replicageneration} 5c7e8927000000010000 Replica RUV: {replica 1 ldap://replica-to-remove.example.com:389} 5c7e8927000100010000 5c7e8927000400010000 {replica 2 ldap://server.example.com:389} {replicageneration} 5c7e8927000000010000
dsconf -D "cn=Directory Manager" ldap:// replica-to-remove.example.com replication get --suffix=" dc=example,dc=com " | grep -i "nsds5replicaid" nsDS5ReplicaId: 1
dsconf -D "cn=Directory Manager" ldap://server.example.com repl-agmt delete --suffix=" dc=example,dc=com " agreement_name
dsconf -D "cn=Directory Manager" ldap:// replica-to-remove.example.com replication disable --suffix=" dc=example,dc=com "
dsconf -D "cn=Directory Manager" ldap://server.example.com repl-tasks cleanallruv --suffix=" dc=example,dc=com " --replica-id= 1