Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 6. Configuring cascading replication using the command line
Configure cascading replication by setting up a hub server that acts as both a consumer and a supplier in your topology. The hub server forwards updates to consumers, reducing the processing burden on the primary supplier, while ensuring consistent data synchronization between the consumers.
The hub is a read-only replica that maintains a changelog.
6.1. Preparing the new hub server using the command line Link kopierenLink in die Zwischenablage kopiert!
Enable replication on the hub.example.com host to configure cascading replication within your topology.
The process achieves the following:
- Configures the role of this server in the replication topology
- Defines the suffix that is replicated
- Creates the replication manager account the supplier uses to connect to this host
Perform this procedure on the hub that you want to add to the replication topology.
Prerequisites
- You installed the Directory Server instance. For details, see Setting up a new instance on the command line using a .inf file.
-
The database for the
dc=example,dc=comsuffix exists.
Procedure
Enable replication for the
dc=example,dc=comsuffix:# dsconf <hub_instance_name> replication enable --suffix "dc=example,dc=com" --role "hub" --bind-dn "cn=replication manager,cn=config" --bind-passwd "<password>"This command configures the
hub.example.comhost as a hub for thedc=example,dc=comsuffix. Additionally, the command creates thecn=replication manager,cn=configuser with the specified password and allows this account to replicate changes for the suffix to this host.
Verification
Display the replication configuration:
# dsconf <hub_instance_name> replication get --suffix "dc=example,dc=com"dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config ... nsDS5ReplicaBindDN: cn=replication manager,cn=config nsDS5ReplicaRoot: dc=example,dc=com nsDS5ReplicaType: 2 nsDS5ReplicaId: 65535 ...These parameters indicate:
-
nsDS5ReplicaBindDNspecifies the replication manager account. -
nsDS5ReplicaRootsets the suffix that is replicated. -
nsDS5ReplicaTypeset to2defines that this host is a consumer, which is also valid for a hub. -
nsDS5ReplicaIdset to65535defines that this host is a hub. Thedsconfutility automatically sets this value if you define the--role "hub"option.
-
6.2. Configuring the existing server as a supplier to the hub server using the command line Link kopierenLink in die Zwischenablage kopiert!
Configure an existing Directory Server instance as a supplier to a hub server to enable cascading replication. Define the supplier settings to send directory updates to the hub that then forwards changes to consumers reducing the processing load on the primary supplier.
To prepare the existing server as a supplier, you need to do the following:
- Enable replication for the suffix.
- Create a replication agreement that points to the hub.
- Initialize the hub.
Perform this procedure on the existing supplier in the replication topology.
Prerequisites
-
You enabled replication for the
dc=example,dc=comsuffix on the hub to join.
Procedure
Enable replication for the
dc=example,dc=comsuffix:# dsconf <supplier_instance_name> replication enable --suffix "dc=example,dc=com" --role "supplier" --replica-id 1This command configures the
supplier.example.comhost as a supplier for thedc=example,dc=comsuffix, and sets the replica ID of this entry to1.ImportantThe replica ID must be a unique integer between
1and65534for a suffix across all suppliers in the topology.Add the replication agreement and initialize the new server:
# dsconf <supplier_instance_name> repl-agmt create --suffix "dc=example,dc=com" --host "hub.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "<password>" --bind-method SIMPLE --init example-agreement-supplier-to-hubThis command creates a replication agreement named
example-agreement-supplier-to-hub. The replication agreement defines settings, such as the hub’s host name, protocol, and authentication information that the supplier uses when connecting and replicating data to the hub.After the agreement was created, Directory Server initializes
hub.example.com. Depending on the amount of data to replicate, initialization can be time-consuming.
Verification
Display the replication configuration:
# dsconf <supplier_instance_name> replication get --suffix "dc=example,dc=com"dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config ... nsDS5ReplicaRoot: dc=example,dc=com nsDS5ReplicaType: 3 ...These parameters indicate:
-
nsDS5ReplicaRootsets the suffix that is replicated. -
nsDS5ReplicaTypeset to3defines that this host is a supplier.
-
Verify whether the initialization was successful:
# dsconf <supplier_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier-to-hubAgreement successfully initialized.Display the replication status:
# dsconf <supplier_instance_name> repl-agmt status --suffix "dc=example,dc=com" example-agreement-supplier-to-hubStatus For Agreement: "example-agreement-supplier-to-hub" (hub.example.com:389) Replica Enabled: on Update In Progress: FALSE Last Update Start: 20210331105030Z Last Update End: 20210331105030Z Number Of Changes Sent: 0 Number Of Changes Skipped: None Last Update Status: Error (0) Replica acquired successfully: Incremental update succeeded Last Init Start: 20210331105026Z Last Init End: 20210331105029Z Last Init Status: Error (0) Total update succeeded Reap Active: 0 Replication Status: Not in Synchronization: supplier (Unknown) consumer (Unknown) State (green) Reason (error (0) replica acquired successfully: incremental update succeeded) Replication Lag Time: UnavailableVerify the
Replication StatusandLast Update Statusfields.
Troubleshooting
By default, the replication idle timeout for all agreements on a server is 1 hour. If the initialization of large databases fails due to timeouts, set the
nsslapd-idletimeoutparameter to a higher value. For example, to set the parameter to7200(2 hours), enter:# dsconf <supplier_instance_name> config replace nsslapd-idletimeout=7200To set an unlimited period, set
nsslapd-idletimeoutto0.
6.3. Preparing the new consumer of the hub using the command line Link kopierenLink in die Zwischenablage kopiert!
Prepare a new consumer instance to receive updates from a hub server in a cascading replication topology. Define the consumer role, configure replication manager credentials, and enable replication via the command line to ensure data synchronization.
Enabling replication on consumer.example.com achieves the following:
- Configures the role of this server in the replication topology
- Defines the suffix that is replicated
- Creates the replication manager account the hub uses to connect to this host
Perform this procedure on the consumer that you want to add to the replication topology.
Prerequisites
- You installed the Directory Server instance. For details, see Setting up a new instance on the command line using a .inf file.
-
The database for the
dc=example,dc=comsuffix exists.
Procedure
Enable replication for the
dc=example,dc=comsuffix:# dsconf <consumer_instance_name> replication enable --suffix "dc=example,dc=com" --role "consumer" --bind-dn "cn=replication manager,cn=config" --bind-passwd "<password>"This command configures the
consumer.example.comhost as a consumer for thedc=example,dc=comsuffix. Additionally, the command creates thecn=replication manager,cn=configuser with the specified password and allows this account to replicate changes for the suffix to this host.
Verification
Display the replication configuration:
# dsconf <consumer_instance_name> replication get --suffix "dc=example,dc=com"dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config ... nsDS5ReplicaBindDN: cn=replication manager,cn=config nsDS5ReplicaRoot: dc=example,dc=com nsDS5ReplicaType: 2 ...These parameters indicate:
-
nsDS5ReplicaBindDNspecifies the replication manager account. -
nsDS5ReplicaRootsets the suffix that is replicated. -
nsDS5ReplicaTypeset to2defines that this host is a consumer.
-
6.4. Configuring the hub server as a supplier for the consumer using the command line Link kopierenLink in die Zwischenablage kopiert!
Configure the hub server as a supplier for a consumer in Directory Server to enable cascading replication. Establishing this relationship enables the hub to forward directory updates to the consumer, ensuring data synchronization across the topology while reducing the processing load on the primary supplier.
To prepare the hub, you need to do the following:
- Create a replication agreement that points to the consumer.
- Initialize the consumer.
Perform this procedure on the hub in the replication topology.
Prerequisites
- The hub is initialized, and replication from the supplier to the hub works.
-
You enabled replication for the
dc=example,dc=comsuffix on the hub.
Procedure
Add the replication agreement and initialize the consumer:
# dsconf <hub_instance_name> repl-agmt create --suffix "dc=example,dc=com" --host "consumer.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "<password>" --bind-method SIMPLE --init example-agreement-hub-to-consumerThis command creates a replication agreement named
example-agreement-hub-to-consumer. 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 this consumer.After the agreement was created, Directory Server initializes
consumer.example.com. Depending on the amount of data to replicate, initialization can be time-consuming.
Verification
Verify whether the initialization was successful:
# dsconf <hub_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-hub-to-consumerAgreement successfully initialized.Display the replication status:
# dsconf <hub_instance_name> repl-agmt status --suffix "dc=example,dc=com" example-agreement-hub-to-consumerStatus For Agreement: "example-agreement-hub-to-consumer" (consumer.example.com:389) Replica Enabled: on Update In Progress: FALSE Last Update Start: 20210331131534Z Last Update End: 20210331131534Z Number Of Changes Sent: 0 Number Of Changes Skipped: None Last Update Status: Error (0) Replica acquired successfully: Incremental update succeeded Last Init Start: 20210331131530Z Last Init End: 20210331131533Z Last Init Status: Error (0) Total update succeeded Reap Active: 0 Replication Status: Not in Synchronization: supplier (Unknown) consumer (Unknown) State (green) Reason (error (0) replica acquired successfully: incremental update succeeded) Replication Lag Time: UnavailableVerify the
Replication StatusandLast Update Statusfields.
Troubleshooting
By default, the replication idle timeout for all agreements on a server is 1 hour. If the initialization of large databases fails due to timeouts, set the
nsslapd-idletimeoutparameter to a higher value. For example, to set the parameter to7200(2 hours), enter:# dsconf <hub_instance_name> config replace nsslapd-idletimeout=7200To set an unlimited period, set
nsslapd-idletimeoutto0.