How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

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

Last updated Jan 11, 2023

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:

  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 --port1 4444 --bindDn1 "cn=Directory Manager" --bindPassword1 password --replicationPort1 8989 --host2 --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 --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 --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 (All versions)?

FAQ: Backup and restore in DS 6.x

Installing and Administering DS

Replication in DS

Configuring Replication

Related Training


Related Issue Tracker IDs


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