15.8. About Initializing a Consumer

download PDF
After creating the replication agreement, initialize the consumer. During this operation, the supplier copies the existing data to the consumer.


Replication will not begin until you initialized the consumer.

15.8.1. When to Initialize a Consumer

Consumer initialization involves copying data from the supplier server to the consumer server. Once the subtree has been physically placed on the consumer, the supplier server can begin replaying update operations to the consumer server.
Under normal operations, the consumer should not ever have to be reinitialized. However, any time there is a chance that there is a big discrepancy between the supplier's data and the consumer's, reinitialize the consumer. For example, if the data on the supplier server is restored from backup, then all consumers supplied by that server should be reinitialized. As another example, if the supplier has not been able to contact the consumer for a long time, like a week, the supplier may determine that the consumer is too far out of date to be updated, and must be reinitialized.
The consumer can either be initialized online using the web console or manually using the command line. Online consumer initialization using the web console is an effective method of initializing a small number of consumers. However, since each replica is initialized in sequence, this method is not suited to initializing a large number of replicas. Online consumer initialization is the method to use when the consumer is initialized as part of configuring the replication agreement on the supplier server.
Manual consumer initialization using the command line is a more effective method of initializing a large number of consumers from a single LDIF file.

15.8.2. Setting Initialization Timeouts

If initialization of large databases fails due to timeouts, set one of the following to a large enough time period or to an unlimited period to enable Directory Server to initialize the entire database before the operation times out:
  • The nsslapd-idletimeout configuration parameter in the cn=config entry sets the timeout for all replication agreements on the server. For example, to disable the timeout globally:
    # dsconf -D "cn=Directory Manager" ldap:// config replace nsslapd-idletimeout=0
  • The nsIdleTimeout parameter in the replication manager's DN set's the timeout for all agreements that use this replication manager entry. For example, to disable the timeout for the cn=replication manager,cn=config entry:
    # ldapmodify -D "cn=Directory Manager" -w -h -p 389 -x
    dn: cn=replication manager,cn=config
    changetype: modify
    add: nsIdleTimeout
    nsIdleTimeout: 0

15.8.3. Initializing a Consumer

This section describes initializing a consumer using the command line and in the web console. Initializing a Consumer Using the Command Line

You can initialize a consumer online and offline using the command line. This section explains both procedures. Initializing a Consumer Online
After creating the replication agreement, use the dsconf repl-agmt init command to initialize a consumer online:
# dsconf -D "cn=Directory Manager" ldap:// repl-agmt \
     init --suffix="suffix" agreement_name Initializing a Consumer Offline
To initialize a consumer offline:
  1. On the supplier:
    1. Shutdown the instance on the supplier:
      # dsctl instance_name stop
    2. Export the userRoot database that contains the suffix to replicate into the /tmp/example.ldif file with replication information:
      # dsctl instance_name db2ldif --replication userRoot /tmp/example.ldif
    3. Start the instance on the supplier:
      # dsctl instance_name start
  2. Copy the exported file to the consumer.
  3. Import the data on the consumer. For details, see Section, “Importing Data While the Server is Offline”.

15.8.4. Initializing a Consumer Using the Web Console

To initialize a consumer online using the web console:
  1. Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
  2. Select the instance.
  3. Open the Replication menu, and select the suffix.
  4. On the Replication Agreements tab, open the Choose Action menu next to the replication agreement for the suffix and select Initialize Agreement.
    If the initialization completed successfully, 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.
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.