---
title: Manual initialization
description: Manual initialization isn't always required. Replication proceeds automatically over the network when replicas start from the same initial data. If this isn't the case, manually initialize replication.
component: pingds
version: 8.1
page_id: pingds:config-guide:repl-init
canonical_url: https://docs.pingidentity.com/pingds/8.1/config-guide/repl-init.html
revdate: 2025-10-22T14:42:39Z
keywords: ["Backup &amp; Restore", "Features", "LDAP", "Replication", "Setup &amp; Configuration", "Troubleshooting"]
section_ids:
  init-repl-online: Initialize over the network
  init-repl-ldif: Initialize all replicas from LDIF
  init-repl-backup: Initialize from backup
---

# Manual initialization

Manual initialization isn't always required. Replication proceeds automatically over the network when replicas start from the same initial data. If this isn't the case, manually initialize replication.

|   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | * Unless you're using [Disaster recovery](../use-cases/disaster-recovery.html) to repair a broken data set, initialization only succeeds when *you restore data more recent than the replication purge delay*.

  Make sure you're restoring from recent data.

* Test the initialization process to make sure you understand the duration and ramifications of the chosen initialization method.

  Use the results to make an evidence-based decision on whether to use backup/restore or export/import instead of online initialization. |

How you initialize replication depends on your situation:

**Initialization options**

| Use cases                                                                                     | Recommendations                                                                                                                                                                                                                                                                                                                                                                                                              |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Replicas installed with same data                                                             | Nothing to do (no manual initialization required)                                                                                                                                                                                                                                                                                                                                                                            |
| Evaluating DS softwareDeveloping a directory solutionPlenty of bandwidth to replicate data    | [Initialize over the network](#init-repl-online)*Limitations:*- Transmits all data over the network, so requires ample bandwidth; can be a problem for slow links.

- Rebuilds indexes and consumes significant system resources; can impact service performance.                                                                                                                                                            |
| New directory service, medium to large data set (> 1 million entries; limited bandwidth)      | [Initialize all replicas from LDIF](#init-repl-ldif)*Limitations:*- Rebuilds indexes and consumes significant system resources; can impact service performance.

- Doesn't correct bad data in the changelog database.                                                                                                                                                                                                       |
| Existing directory service, medium to large data set (> 1 million entries; limited bandwidth) | [Initialize from backup](#init-repl-backup)*Limitations:*- All DS servers must be the same version. Backups are not guaranteed to be compatible across major and minor server releases.

- Doesn't correct bad data in the changelog database.                                                                                                                                                                               |
| New backend                                                                                   | [Create a backend](import-export.html#create-database-backend), then one of:- [Initialize over the network](#init-repl-online)

- [Initialize all replicas from LDIF](#init-repl-ldif)

- [Back up](../maintenance-guide/backup-restore.html#backup) the new backend, then [Initialize from backup](#init-repl-backup)*Limitations:*- The limitations depend on how you initialize the new backend, and are described above. |
| Broken data set                                                                               | [Disaster recovery](../use-cases/disaster-recovery.html)*Limitations:*- This method **permanently loses recent changes**.

- Applications using the changelog must be reinitialized after you restore the data.                                                                                                                                                                                                              |

## Initialize over the network

Review [Initialization options](#init-repl-options) before following these steps:

1. Manually initialize replication using the replication protocol's total update capability in one of these ways:

   1. Overwrite the data in all replicas with the data from the replica where the command runs:

      ```console
      $ dsrepl \
       initialize \
       --baseDN dc=example,dc=com \
       --toAllServers \
       --hostname localhost \
       --port 4444 \
       --bindDN uid=admin \
       --bindPassword password \
       --trustStorePath /path/to/opendj/config/keystore \
       --trustStorePassword:file /path/to/opendj/config/keystore.pin \
       --no-prompt
      ```

   2. Initialize a single other replica, identified by its server ID, from the replica where the command runs:

      ```console
      $ dsrepl \
       initialize \
       --baseDN dc=example,dc=com \
       --toServer ds-1 \
       --hostname localhost \
       --port 4444 \
       --bindDN uid=admin \
       --bindPassword password \
       --trustStorePath /path/to/opendj/config/keystore \
       --trustStorePassword:file /path/to/opendj/config/keystore.pin \
       --no-prompt
      ```

## Initialize all replicas from LDIF

|   |                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | If you aim to initialize replicas with LDAP Data Interchange Format (LDIF) *(tooltip: \<div class="paragraph">&#xA;\<p>An IETF standard file format for representing LDAP directory content and modifications to directory content. Typically used to import and export LDAP-based directory information.\</p>&#xA;\</div>)* from a non-replicated environment, follow the steps in [Disaster recovery](../use-cases/disaster-recovery.html) instead. |

Review [Initialization options](#init-repl-options) before following these steps:

Initialize each replica with the same LDIF:

1. Stop the server.

2. If desired, enable data confidentiality.

   Learn more in [Data encryption](../security-guide/data.html) and [Encrypt External Changelog Data](changelog.html#encrypt-ecl).

3. Import the LDIF.

   Learn more in [Import LDIF](import-export.html#import-ldif).

4. Start the server.

## Initialize from backup

Review [Initialization options](#init-repl-options) before following these steps:

1. Stop the replica.

2. Restore the backend from backup.

   Learn more in [Restore](../maintenance-guide/backup-restore.html#restore).

3. Start the replica.

   Replication replays changes from other replicas that have happened since the backup was created.
