How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I quickly create a new DS 5.x or 6.x replica?

Last updated Nov 11, 2021

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

Overview

DS 7 introduces several improvements, which makes creating a new replica much simpler. See Add a Replica for the process.

In earlier versions, you should follow the steps in the Creating a new replica (pre-DS 7) section.

Creating a new replica (pre-DS 7)

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:

  1. Install and configure your new replica server (DS2) from scratch with non-replicated configuration elements such as password policies, global ACI, backends, indexes etc.
  2. 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
  3. 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
  4. Transfer the backup you created in step 3 from DS1 to DS2.
  5. Stop the DS2 server where the data will be restored from backup using offline mode in the next step. $ ./stop-ds --quiet
  6. 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
  7. 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. 

See Also

How do I design and implement my backup and restore strategies for DS 5.x and 6.x?

FAQ: Backup and restore in DS 5.x and 6.x

Installing and Administering DS

Replication in DS

Configuring Replication

Related Training

N/A

Related Issue Tracker IDs

N/A


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.