REPLICATION OF LDAP DATABASE

For Replication we follow the following steps:

1. Stop the master server's slapd daemon.

2. Reconfigure the master server's slapd.conf to enable replication to the new slave server.

3. Copy the database from the master server to the replica.

4. Configure the replica server's slapd.conf.

5. Start the replica server's slapd process

6. Start the master server's slapd process.

7. Start the master server's slurpd process.


1. MASTER SIDE:

For replication add the following lines to slapd.conf already created above.

 replogfile    /var/ldap/slapd.replog

replica        uri=ldap://192.168.1.21:389 

                   suffix="dc=mnit,dc=ac,dc=in"

                   binddn="uid=easypush,ou=people,dc=mnit,dc=ac,dc=in"

                   bindmethod=simple 

                   credentials=******

 2. SLAVE SIDE:

 Here we add the following attributes to slapd.conf created for authentication. (All other attributes remain the same).

 updatedn             "uid=easypush,ou=people,dc=mnit,dc=ac,dc=in"

updateref              ldap://192.168.1.20:389

 ►Now we have to start the slurpd daemon for sending updation information to the slave.

 #  cd /var/easypush/ldap/sbin

# ./slurpd –d 1

 slurpd reads the ‘slapd.replog’ file created by the master slapd process where modification information is stored in LDIF format. After reading this replogfile, slurpd copies the entry to its own replay log ‘slurpd.replog’.

slurpd reads entries in the replication log file one at a time and propagates the changes using basic LDAP commands (e.g., add, modify, delete, modrdn, etc.). If a change cannot be made, slurpd writes the entry and reason for the failure to a reject log named .rej in the same directory as the slurpd.replog file.

 

0 comments:

Copyright © 2008 - ProSceNiuM - is proudly powered by Blogger
Blogger Template