Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 9. 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.

9.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

  1. 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:

    1. List the replication agreements on the hub:

      # dsconf <instance_name> 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
      ...
      Copy to Clipboard Toggle word wrap

      The cn attribute contains the replication agreement name that you need in the next step.

    2. Remove the replication agreement from the hub:

      # dsconf <instance_name> repl-agmt delete --suffix "dc=example,dc=com" example-agreement
      Copy to Clipboard Toggle word wrap
  2. Promote the instance:

    • If you promote a consumer or hub to a supplier, enter:

      # dsconf <instance_name> replication promote --suffix "dc=example,dc=com" --newrole "supplier" --replica-id 2
      Copy to Clipboard Toggle word wrap
      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 <instance_name> replication promote --suffix "dc=example,dc=com" --newrole "hub"
      Copy to Clipboard Toggle word wrap
  3. If the replica in its new role should send updates to other hosts in the topology, create replication agreements.

9.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

  1. 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:

    1. Navigate to Replication Agreements.
    2. Click Actions next to the agreement you want to delete, and select Delete Agreement.
  2. 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.
  3. Select Yes, I am sure.
  4. Click Change Role.
  5. If the replica in its new role should send updates to other hosts in the topology, create replication agreements.

9.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

  1. 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:

    1. List the replication agreements on the replica:

      # dsconf <instance_name> 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
      ...
      Copy to Clipboard Toggle word wrap

      The cn attribute contains the replication agreement name that you need in the next step.

    2. Remove the replication agreement from the replica:

      # dsconf <instance_name> repl-agmt delete --suffix "dc=example,dc=com" example-agreement
      Copy to Clipboard Toggle word wrap
  2. Demote the instance:

    # dsconf <instance_name> replication demote --suffix "dc=example,dc=com" --newrole "hub_or_consumer"
    Copy to Clipboard Toggle word wrap

    Depending on the role you want to configure, set the --newrole parameter to hub or consumer.

  3. If you configured the replica as a hub and it should send updates to other hosts in the topology, create replication agreements.

9.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

  1. 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:

    1. Navigate to Replication Agreements.
    2. Click Actions next to the agreement you want to delete, and select Delete Agreement.
  2. Navigate to Replication Configuration, and click Change Role button.
  3. Select the new replica role.
  4. Select Yes, I am sure.
  5. Click Change Role.
  6. If the replica in its new role should send updates to other hosts in the topology, create replication agreements.
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat