How do I quickly create a new DS 6.x replica?
The purpose of this article is to provide information on quickly creating a new DS replica. It assumes you have an existing replication topology.
2 readers recommend this article
This article does not apply to DS 7 and later, because DS 7 introduces several improvements, which makes creating a new replica much simpler. See Add a Replica for the process.
Creating a new replica
This process refers to the following example servers in the commands to help distinguish between them:
- DS1 - an existing replica in the replication topology.
- DS2 - the new replica server being added to the replication topology.
You can create a new replica as follows:
- Install and configure your new replica server (DS2) from scratch with non-replicated configuration elements such as password policies, global ACI, backends, indexes etc.
- Enable replication on your new replica server using the dsreplication command (do not use the dsreplication initialize command). For example: $ ./dsreplication configure --adminUid admin --adminPassword password --baseDn dc=example,dc=com --host1 ds1.example.com --port1 4444 --bindDn1 "cn=Directory Manager" --bindPassword1 password --replicationPort1 8989 --host2 ds2.example.com --port2 4444 --bindDn2 "cn=Directory Manager" --bindPassword2 password --replicationPort2 8989 --trustAll --no-prompt
- Back up an existing replica (DS1) in your replication topology using the backup command, for example: $ ./backup --hostname ds1.example.com --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --backendID [backendID] --backupDirectory /path/to/ds/bak --start 0
- Transfer the backup you created in step 3 from DS1 to DS2.
- Stop the DS2 server where the data will be restored from backup using offline mode in the next step. $ ./stop-ds --quiet
- Restore the data offline from the backup to your new replica server using the restore command, for example: $ ./restore --hostname ds2.example.com --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --backupID [backupid] --backupDirectory /path/to/ds/bak --offline
- Start the DS2 server. $ ./start-ds --quiet
You have now created a new replica that is synchronized with your replication topology. Any changes made to the other servers in between taking the backup and running restore will now be replayed on the new server, as long as the replication purge delay covers the time between steps 2 and 6. The default replication purge delay is 3 days. See Restoring Directory Data From Backup for further details.
How do I design and implement my backup and restore strategies for DS (All versions)?
FAQ: Backup and restore in DS 6.x
Installing and Administering DS
Related Issue Tracker IDs