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.
|
How you initialize replication depends on your situation:
Use cases | Recommendations |
---|---|
Replicas installed with same data |
Nothing to do (no manual initialization required) |
Evaluating DS software Developing a directory solution Plenty of bandwidth to replicate data |
Limitations:
|
New directory service, medium to large data set (> 1 million entries; limited bandwidth) |
Limitations:
|
Existing directory service, medium to large data set (> 1 million entries; limited bandwidth) |
Limitations:
|
New backend |
Create a backend, then one of:
Limitations:
|
Broken data set |
Limitations:
|
Initialize over the network
Review Initialization options before following these steps:
-
Manually initialize replication using the replication protocol’s total update capability in one of these ways:
-
Overwrite the data in all replicas with the data from the replica where the command runs:
$ 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
-
Initialize a single other replica, identified by its server ID, from the replica where the command runs:
$ 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 LDIF from a non-replicated environment, follow the steps in Disaster recovery instead. |
Review Initialization options before following these steps:
Initialize each replica with the same LDIF:
-
Stop the server.
-
If desired, enable data confidentiality.
Learn more in Data encryption and Encrypt External Changelog Data.
-
Import the LDIF.
Learn more in Import LDIF.
-
Start the server.
Initialize from backup
Review Initialization options before following these steps:
-
Stop the replica.
-
Restore the backend from backup.
Learn more in Restore.
-
Start the replica.
Replication replays changes from other replicas that have happened since the backup was created.