Example 1 - Replicating Data From A Master Server To One Replica Server

This section walks you through the process of setting up a replication scenario in which data is replicated from a master server to one replica server. (A master server contains the data that is to be replicated; a replica server (also called a slave server) receives the replicated data from the master server.) This replication example assumes the following:

A data store was created during the installation of the mail server software and its subsequent initialization.
All attributes will be replicated rather than customizing which attributes will or will not be replicated.
  1. Bring up the Admin console on the slave host (the host which will hold a replicated LDAP directory).
  In this example the slave host is called slave1. Load http://slave1.eng/sims
  2.

FIGURE  B-1 SIMS Directory Interface

  3. Click on Data Store.
  Directory information is organized in a tree structure called the Directory Information Tree (DIT). A naming context refers to a particular branch or subtree of the DIT. A data store is where directory information is stored in naming contexts.
 

FIGURE  B-2 Data Store

  4. Double click the data store name (o=adagio,c=US) to bring up the data store property book. Then click on Naming Contexts section.
 

FIGURE  B-3 Naming Contexts

  Although two naming contexts are shown, they actually refer to the same subtree. The top one is called the OSI tree and the bottom one is called the Domain Component tree, and they are mapped to each other. The reason for having two naming contexts referring to the same subtree has to do with dual standards. You must configure both as Slaves if they are not already configured as such.
  5. Modify the naming contexts to be slaves.
 

FIGURE  B-4 Modify Naming Context Window

  Leave Subtree type as Subtree and leave suffix as o=adagio,c=US--unless you wish to only replicate a branch of the such as ou=eng,o=adagio,c=US or ou=mktg,o=adagio,c=US. Change the mode to Slave. Next to Referral hostname, enter the fully qualified name of the master LDAP directory host is entered.
  Update DN is the distinguished name of a user under whom the master server will login to the slave server to modify entries. This DN must have the appropriate ACL to modify entries in the specified suffix of the slave server. Remember this DN because you will have to enter it when you configure the master server, which must be configured to update this new slave. The example shows that Update DN is set to cn=admin,o=adagio,c=US. After making all changes, press OK to save.
  Now double click the second naming context (Domain Component or DC subtree) dc=adagio,dc=com. In the Modify Naming Context window, repeat the above steps for the Domain Component subtree (naming context: dc=adagio,dc=com). After making both naming contexts slaves, press Apply on the property book. The directory server on the replicated system is now set up as a slave.
  The next step is to set up a new replica on the master LDAP server. Many of the steps are similar to the setting up the slave server.
  6. On a HotJava browser, go to the Naming Context section of the Data Store property book on the LDAP master host.
  Load http://themaster.eng/sims, go to Sun Directory Services->Data Store, and double click on the Data Store "o=adagio,c=US"
  7. Create a directory replica for the OSI data tree.
 

FIGURE  B-5 Add an LDAP Replica from Master Server Admin Console

  Set Subtree to naming contest that you want replicated to the slave server (slave1.eng.adagio.com). In our example, we are replicating the entire directory, so type "o=adagio,c=US" in the subtree field. If you only wish to replicate a branch of the tree such as ou=eng,o=adagio,c=US or ou=mktg,o=adagio,c=US, then enter that as the naming context.
  Select All attributes. In the Host field, enter the fully qualified domain name of the slave server (slave1.eng) and the port number on which the slave LDAP server is listening (default=389). Update DN field should be the same name of Update DN that you entered in the slave server (in this example cn=admin,o=adagio,c=US). The password must be the password for the Update DN on the slave. This is the password used by the master server to make updates to the slave server, so make sure that this DN has the appropriate access control permissions for making the changes to the slave.
  8. Create a directory replica for the DC data tree.
  Since you need updates to both the OSI tree and the Domain component tree, define another replica, this time entering dc=adagio,dc=com in the subtree field and dc=admin,dc=adagio,dc=com in the Update DN field.
  9. Apply the replica modifications.
 

FIGURE  B-6 Applying Modifications to the Data Store.

  10. Synchronize the replica and set synchronization schedule.
 

FIGURE  B-7 Applying Modifications to the Data Store.

  At Replica Synchronization, above the Naming Context table, select "immediate" for immediate updates (every time an entry is modified, added, or deleted, the change is sent to the slave) or if you choose Delayed, specify a schedule for the updates. You can also perform a complete synchronization of the master with the slave by pressing the "synchronize" button.
  11. When synchronization occurs, the slave server is operational.



Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.