15.2. Single-supplier Replication In a single-supplier replication scenario, the supplier copy of the directory data is held in a single read-write replica on one server called the supplier server . The supplier also maintains the changelog for this replica. On another server, called the consumer server , a read-only copy of the directory is stored. In a single-supplier replication environment, you can run multiple consumers. Use a single-supplier replication topology, for example, if a suffix receives a large number of search requests, but a small number of write requests. To distribute the load, clients can run searches for the suffix on all servers in the topology and send write requests to the supplier. The following diagram shows a single-supplier replication environment with two consumers: Figure 15.1. Single-supplier Replication Use the command line or web console to set up a single-supplier replication topology. See: Section 15.2.1, "Setting up Single-supplier Replication Using the Command Line" Section 15.2.2, "Setting up Single-supplier Replication Using the Web Console" 15.2.1. Setting up Single-supplier Replication Using the Command Line The following example assumes that you have an existing Directory Server instance running on a host named supplier.example.com that will act as a supplier in the replication topology to be set up. The following procedures describe how to add a read-only consumer named consumer.example.com to the topology, and how to configure single-supplier replication for the dc=example,dc=com suffix. Steps to be Performed on the Consumer On the consumer.example.com host: Install Directory Server, and create an instance. For details, see the Red Hat Directory Server Installation Guide . In case you created the instance without a database, create the database for the suffix. For example, to create a database named userRoot for the dc=example,dc=com suffix: For details on creating a database for a suffix, see Section 2.1.1, "Creating Suffixes" . Enable replication for the suffix, and create the replication manager account: This command configures the consumer.example.com host as a consumer for the dc=example,dc=com suffix. Additionally, the server creates the cn=replication manager,cn=config user with the specified password, and allows this account to replicate changes for the suffix to this host. To add multiple consumers for the suffix to the topology, repeat the steps on each consumer. Steps to be Performed on the Supplier On the supplier.example.com host: Enable replication for the dc=example,dc=com suffix: This command configures the supplier.example.com host as a supplier for the dc=example,dc=com suffix, and sets the replica ID for this entry to 1 . Important The replica ID must be a unique integer between 1 and 65534 for a suffix across all suppliers in the topology. Add the replication agreement, and initialize the consumer. For example: This command creates a replication agreement named example-agreement . The replication agreement defines settings, such as the consumer's host name, protocol, and authentication information that the supplier uses when connecting and replicating data to the consumer. After the agreement was created, Directory Server initializes the consumer. To initialize the consumer later, omit the --init option. Note that replication does not start before you initialize the consumer. For details about initializing a consumer, see Section 15.8.3, "Initializing a Consumer" . For further details about the options used in the command, enter: Verify whether the initialization was successful: Depending on the amount of data to replicate, the initialization can be time-consuming. If you add multiple consumers for the suffix to the topology, repeat the steps on the supplier for each consumer. However, you must enable replication for the suffix only once on the supplier. 15.2.2. Setting up Single-supplier Replication Using the Web Console The following example assumes that you have an existing Directory Server instance running on a host named supplier.example.com that will act as a supplier in the replication topology to be set up. The following procedures describe how to add a read-only consumer named consumer.example.com to the topology, and how to configure single-supplier replication for the dc=example,dc=com suffix. Steps to be Performed on the Consumer On the consumer.example.com host: Install Directory Server, and create an instance. For details, see the Red Hat Directory Server Installation Guide . Open the Directory Server user interface in the web console. See Section 1.4, "Logging Into Directory Server Using the Web Console" . Select the instance. In case you created the instance without a database, create the database for the suffix. For details about creating a database for a suffix, see Section 2.1.1, "Creating Suffixes" . Enable replication for the suffix: Open the Replication menu. Select the dc=example,dc=com suffix, and click Enable Replication . Select Consumer in the Replication Role field, and enter the DN and password of the replication manager account to create. For example: These settings configure the host as a consumer for the dc=example,dc=com suffix. Additionally, the server creates the cn=replication manager,cn=config user with the specified password, and allows this account to replicate changes for the suffix to this host. Click Enable Replication . To add multiple consumers for the suffix to the topology, repeat the steps on each consumer. Steps to be Performed on the Supplier On the supplier.example.com host: Open the Directory Server user interface in the web console. See Section 1.4, "Logging Into Directory Server Using the Web Console" . Select the instance. Enable replication for the dc=example,dc=com suffix: Open the Replication menu. Select the dc=example,dc=com suffix, and click Enable Replication . Select Supplier in the Replication Role field, enter a replica ID, and leave the fields in the Replication Authentication area empty. For example: This configures the host as a supplier for the dc=example,dc=com suffix, and sets the replica ID for this entry to 1 . Important The replica ID must be a unique integer between 1 and 65534 for a suffix across all suppliers in the topology. Click Enable Replication . Add the replication agreement, and initialize the consumer: Open the Replication menu, and select the dc=example,dc=com suffix. On Replication Agreements tab, click Create Agreement , and fill the fields. For example: These settings create a replication agreement named example-agreement . The replication agreement defines settings, such as the consumer's host name, protocol, and authentication information that the supplier uses when connecting and replicating data to the consumer. Select Do Online Initialization in the Consumer Initialization field to automatically initialize the consumer after saving the agreement. To initialize the consumer later, select Do Not Initialize . Note that replication does not start before you initialize the consumer. For details about initializing a consumer, see Section 15.8.3, "Initializing a Consumer" . Click Save Agreement . Verify whether the initialization was successful: Open the Replication menu. Select the Agreements entry. For a successfully-completed initialization, the web console displays the Error (0) Replica acquired successfully: Incremental update succeeded message in the Last Update Status column. Depending on the amount of data to replicate, the initialization can be time-consuming. If you add multiple consumers for the suffix to the topology, repeat the steps on the supplier for each consumer. However, you must enable replication for the suffix only once on the supplier.

Commands:
dsconf -D "cn=Directory Manager" ldap://consumer.example.com backend create --suffix="dc=example,dc=com" --be-name="userRoot"
dsconf -D "cn=Directory Manager" ldap://consumer.example.com replication enable --suffix="dc=example,dc=com" --role="consumer" --bind-dn="cn=replication manager,cn=config" --bind-passwd=" password "
dsconf -D "cn=Directory Manager" ldap://supplier.example.com replication enable --suffix="dc=example,dc=com" --role="supplier" --replica-id=1
dsconf -D "cn=Directory Manager" ldap://supplier.example.com repl-agmt create --suffix="dc=example,dc=com" --host="consumer.example.com" --port= 636 --conn-protocol= LDAPS --bind-dn="cn=replication manager,cn=config" --bind-passwd=" password " --bind-method= SIMPLE --init example-agreement
dsconf -D "cn=Directory Manager" ldap://supplier.example.com repl-agmt --help
dsconf -D "cn=Directory Manager" ldap://supplier.example.com repl-agmt init-status --suffix=" dc=example,dc=com " example-agreement Agreement successfully initialized.