Chapter 12. Changing the role of a replica In a replication topology, you can change the role of replicas. For example, if a supplier is unavailable due to a hardware outage, you can promote a consumer to a supplier. The other way around, you can demote, for example, a supplier with low hardware resources to a consumer and later add another supplier with new hardware. 12.1. Promoting a replica using the command line You can promote: A consumer to a hub or supplier A hub to a supplier This section describes how to promote a replica of the dc=example,dc=com suffix. Prerequisites The Directory Server instance is a member of a replication topology. The replica to promote is a consumer or hub. Procedure If the replica to promote is a hub with replication agreements, and the hub should no longer send data to other hosts after the promotion, remove the replication agreements: List the replication agreements on the hub: # dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt list --suffix " dc=example,dc=com " dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config cn: example-agreement ... The cn attribute contains the replication agreement name that you need in the step. Remove the replication agreement from the hub: # dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt delete --suffix " dc=example,dc=com " example-agreement Promote the instance: If you promote a consumer or hub to a supplier, enter: # dsconf -D " cn=Directory Manager " ldap://server.example.com replication promote --suffix " dc=example,dc=com " --newrole " supplier " --replica-id 2 Important The replica ID must be a unique integer value between 1 and 65534 for a suffix across all suppliers in the topology. If you promote a consumer to a hub, enter: # dsconf -D " cn=Directory Manager " ldap://server.example.com replication promote --suffix " dc=example,dc=com " --newrole " hub " If the replica in its new role should send updates to other hosts in the topology, create replication agreements. Additional resources Configuring single-supplier replication using the command line Configuring multi-supplier replication using the command line Configuring cascading replication using the command line 12.2. Promoting a replica using the web console You can promote: A consumer to a hub or supplier A hub to a supplier This section describes how to promote a replica of the dc=example,dc=com suffix. Prerequisites The Directory Server instance is a member of a replication topology. The replica to promote is a consumer or hub. You are logged in to the instance in the web console. Procedure If the replica to promote is a hub with replication agreements, and the hub should no longer send data to other hosts after the promotion, remove the replication agreements: Navigate to Replication Agreements . Click Actions to the agreement you want to delete, and select Delete Agreement . Navigate to Replication Configuration , and click the Change Role button. If you promote a consumer or hub to a supplier, select Supplier , and enter a unique replica ID. Important The replica ID must be a unique integer value between 1 and 65534 for a suffix across all suppliers in the topology. If you promote a consumer to a hub, select Hub . Select Yes, I am sure . Click Change Role . If the replica in its new role should send updates to other hosts in the topology, create replication agreements. Additional resources Configuring single-supplier replication using the web console Configuring multi-supplier replication using the web console Configuring cascading replication using the web console 12.3. Demoting a replica using the command line You can demote: A supplier or hub to a consumer A hub to a consumer This section describes how to demote a replica of the dc=example,dc=com suffix. Prerequisites The Directory Server instance is a member of a replication topology. The replica to demote is a supplier or hub. Procedure If the replica to demote has replication agreements that are no longer needed, for example, because you demote the replica to a consumer, remove the replication agreements: List the replication agreements on the replica: # dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt list --suffix " dc=example,dc=com " dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config cn: example-agreement ... The cn attribute contains the replication agreement name that you need in the step. Remove the replication agreement from the replica: # dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt delete --suffix " dc=example,dc=com " example-agreement Demote the instance: # dsconf -D " cn=Directory Manager " ldap://server.example.com replication demote --suffix " dc=example,dc=com " --newrole " hub_or_consumer " Depending on the role you want to configure, set the --newrole parameter to hub or consumer . If you configured the replica as a hub and it should send updates to other hosts in the topology, create replication agreements. Additional resources Configuring single-supplier replication using the command line Configuring multi-supplier replication using the command line Configuring cascading replication using the command line 12.4. Demoting a replica using the web console You can demote: A supplier or hub to a consumer A hub to a consumer This section describes how to demote a replica of the dc=example,dc=com suffix. Prerequisites The Directory Server instance is a member of a replication topology. The replica to demote is a supplier or hub. You are logged in to the instance in the web console. Procedure If the replica to demote has replication agreements that are no longer needed, for example, because you demote the replica to a consumer, remove the replication agreements: Navigate to Replication Agreements . Click Actions to the agreement you want to delete, and select Delete Agreement . Navigate to Replication Configuration , and click Change Role button. Select the new replica role. Select Yes, I am sure . Click Change Role . If the replica in its new role should send updates to other hosts in the topology, create replication agreements. Additional resources Configuring single-supplier replication using the web console Configuring multi-supplier replication using the web console Configuring cascading replication using the web console

Commands:
dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt list --suffix " dc=example,dc=com " dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config cn: example-agreement
dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt delete --suffix " dc=example,dc=com " example-agreement
dsconf -D " cn=Directory Manager " ldap://server.example.com replication promote --suffix " dc=example,dc=com " --newrole " supplier " --replica-id 2
dsconf -D " cn=Directory Manager " ldap://server.example.com replication promote --suffix " dc=example,dc=com " --newrole " hub "
dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt list --suffix " dc=example,dc=com " dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config cn: example-agreement
dsconf -D " cn=Directory Manager " ldap://server.example.com repl-agmt delete --suffix " dc=example,dc=com " example-agreement
dsconf -D " cn=Directory Manager " ldap://server.example.com replication demote --suffix " dc=example,dc=com " --newrole " hub_or_consumer "