Manage data replication between two or more Directory Server instances.
For replication to work, you must first to enable replication using the 'enable'. Then, you initialize the contents of one of the servers with the contents of the other using the 'initialize' subcommand.
dsreplication
dsreplication enable --host1 server1.example.com --port1 1389 \ --bindDN1 "cn=Directory Manager" --bindPassword1 secret1 \ --replicationPort1 8989 --host2 server2.example.com --port2 1389 \ --bindDN2 "cn=Directory Manager" --bindPassword2 secret2 \ --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \ --adminPassword secret --no-prompt
dsreplication status --hostname host.example.com --port 1389 --adminUID admin \ --adminPassword secret --no-prompt
Removes all replication artifacts from the configuration, schema and the server registry of the local server
This subcommand does not remove references to this server from other replicas and replication servers in the topology, it is therefore recommended to remove this server first from the replication topology either by using the disable or the remove-defunct-server subcommands
Since this subcommand can only be executed when the server is offline, replication attributes from suffixes other than the server registry or the schema will not be removed. The tool will produce an LDIF file that may be used to the remove replica state from the base entry of these suffixes after the server is restarted
To remove the replication history from regular suffixes, export the formerly replicated suffixes using --excludeReplication argument of export-ldif. The resulting LDIF can be reimported using import-ldif. For example, export-ldif -n userRoot --excludeReplication -l cleansed.ldif import-ldif -n userRoot -l cleansed.ldif Exporting using the --excludeReplication argument of export-ldif will also remove the replica state from the output. In this case, the LDIF created by the cleanup-local-server subcommand does not need to be applied after the server is restarted
dsreplication cleanup-local-server --changelogDir changelogDb
-d {changelogDb}
--changelogDir {changelogDb}
Description | Path to the replication changelog database directory |
Default Value | changelogDb |
Required | No |
Multi-Valued | No |
Disable replication on the specified server for the provided base DN and removes references to this server in the other servers with which it is replicating data
dsreplication disable --hostname host.example.com --port 1389 \ --baseDN dc=example,dc=com --adminUID admin --adminPassword secret \ --no-prompt
-h {host}
--hostname {host}
Description | Directory Server hostname or IP address |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--port {port}
Description | Directory Server port number |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-Z
--useSSL
Description | Use SSL for secure communication with the server |
-q
--useStartTLS
Description | Use StartTLS to secure communication with the server |
-a
--disableAll
Description | Disable replication on all domains |
Update the configuration of the servers to replicate the data under the specified base DN. If one of the servers is already replicating the data under the base DN with other servers, executing this subcommand will update the configuration of all the servers (so it is sufficient to execute the command-line once for each server you add to the replication topology). The server-to-server replication communication is always secured with SSL.
dsreplication enable --host1 server1.example.com --port1 1389 \ --bindDN1 "cn=Directory Manager" --bindPassword1 secret1 \ --replicationPort1 8989 --host2 server2.example.com --port2 1389 \ --bindDN2 "cn=Directory Manager" --bindPassword2 secret2 \ --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \ --adminPassword secret --no-prompt
-h {host}
--host1 {host}
Description | Fully qualified host name or IP address of the first server whose contents will be replicated |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--port1 {port}
Description | Port number of the first server whose contents will be replicated |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-D {bindDN}
--bindDN1 {bindDN}
Description | DN used to bind to the first server whose contents will be replicated. If not specified, the global administrator will be used to bind |
Default Value | cn=Directory Manager |
Required | No |
Multi-Valued | No |
--bindPassword1 {bindPassword}
Description | Password used to bind to the first server whose contents will be replicated. If no bind DN was specified, the password of the global administrator will be used to bind |
Required | No |
Multi-Valued | No |
--bindPasswordFile1 {bindPasswordFile}
Description | File containing the password used to bind to the first server whose contents will be replicated. If no bind DN is specified, the password of the global administrator will be used to bind |
Required | No |
Multi-Valued | No |
-q
--startTLS1
Description | Use StartTLS to secure communication with the first server |
-Z
--useSSL1
Description | Use SSL for secure communication with the first server |
-r {port}
--replicationPort1 {port}
Description | Port that will be used by the replication mechanism in the first server to communicate with the other servers. You have to specify this option only if replication was not previously configured on the first server. |
Default Value | 8989 |
Required | No |
Multi-Valued | No |
-g {priority}
--gatewayPriority1 {priority}
Description | Gateway priority of the first server. Specify this option only if replication was not previously configured on the first server |
Default Value | 5 |
Required | No |
Multi-Valued | No |
--location1 {location}
Description | The location of the first server. Specify this option only if replication was not previously configured on this server |
Required | No |
Multi-Valued | No |
-O {host}
--host2 {host}
Description | Fully qualified host name or IP address of the second server whose contents will be replicated |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
--port2 {port}
Description | Port number of the second server whose contents will be replicated |
Default Value | 389 |
Required | No |
Multi-Valued | No |
--bindDN2 {bindDN}
Description | DN used to bind to the second server whose contents will be replicated. If not specified, the global administrator will be used to bind |
Default Value | cn=Directory Manager |
Required | No |
Multi-Valued | No |
--bindPassword2 {bindPassword}
Description | Password used to bind to the second server whose contents will be replicated. If not specified, the password of the global administrator will be used to bind |
Required | No |
Multi-Valued | No |
-F {bindPasswordFile}
--bindPasswordFile2 {bindPasswordFile}
Description | File containing the password used to bind to the second server whose contents will be replicated. If no bind DN was specified, the password of the global administrator will be used to bind |
Required | No |
Multi-Valued | No |
--startTLS2
Description | Use StartTLS to secure communication with the second server |
-z
--useSSL2
Description | Use SSL for secure communication with the second server |
-R {port}
--replicationPort2 {port}
Description | Port that will be used by the replication mechanism in the second server to communicate with the other servers. You have to specify this option only if replication was not previously configured on the second server. |
Default Value | 8989 |
Required | No |
Multi-Valued | No |
-G {priority}
--gatewayPriority2 {priority}
Description | Gateway priority of the second server. Specify this option only if replication was not previously configured on the second server |
Default Value | 5 |
Required | No |
Multi-Valued | No |
--location2 {location}
Description | The location of the second server. Specify this option only if replication was not previously configured on this server |
Required | No |
Multi-Valued | No |
-S
--skipPortCheck
Description | Skip the check to determine whether the specified replication ports are usable |
--noSchemaReplication
Description | Do not replicate the schema between the servers |
--useSecondServerAsSchemaSource
Description | Use the second server to initialize the schema of the first server. If neither this option nor option --noSchemaReplication are specified, the schema of the first server will be used to initialize the schema of the second server |
--restricted {baseDN}
Description | The specified base DN is configured as an entry-balancing point in the Directory Proxy Server. Replication for this base DN will be limited to server instances with the same replication set name |
Required | No |
Multi-Valued | Yes |
--saslOption1 {name=value}
Description | SASL bind options for the first server |
Required | No |
Multi-Valued | Yes |
--saslOption2 {name=value}
Description | SASL bind options for the second server |
Required | No |
Multi-Valued | Yes |
Initialize the data under a specified base DN on the destination server with the contents on a source server ('initialize-all' can also be used for this purpose)
dsreplication initialize --hostSource src.example.com --portSource 1389 \ --hostDestination dst.example.com --portDestination 2389 \ --baseDN dc=example,dc=com --adminUID admin --adminPassword secret \ --no-prompt
-h {host}
--hostSource {host}
Description | Fully qualified host name or IP address of the source server whose contents will be used to initialize the destination server |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--portSource {port}
Description | Port number of the source server whose contents will be used to initialize the destination server |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-Z
--useSSLSource
Description | Use SSL for secure communication with the source server |
-q
--startTLSSource
Description | Use StartTLS to secure communication with the source server |
-O {host}
--hostDestination {host}
Description | Fully qualified host name or IP address of the destination server whose contents will be initialized |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
--portDestination {port}
Description | Port number of the destination server whose contents will be initialized |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-z
--useSSLDestination
Description | Use SSL for secure communication with the destination server |
--startTLSDestination
Description | Use StartTLS to secure communication with the destination server |
Initialize the data under a specified base DN on all the servers in the replication topology with the contents on a specified server ('initialize' applied to each server can also be used for this purpose)
dsreplication initialize-all --hostname source.example.com --port 1389 \ --baseDN dc=example,dc=com --adminUID admin \ --adminPasswordFile password.txt --no-prompt
-h {host}
--hostname {host}
Description | Directory Server hostname or IP address |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--port {port}
Description | Directory Server port number |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-Z
--useSSL
Description | Use SSL for secure communication with the server |
-q
--useStartTLS
Description | Use StartTLS to secure communication with the server |
This subcommand must be called after replacing the data for one or more base DNs across all servers. You must specify the list of base DNs that have been initialized and apply the subcommand, once, to any of the replicating servers. See the usage of the 'post-external-initialization' subcommand for more information
dsreplication post-external-initialization --hostname host.example.com \ --port 1389 --baseDN dc=example,dc=com \ --baseDN ou=people,dc=example,dc=com --adminUID admin \ --adminPassword secret
-h {host}
--hostname {host}
Description | Directory Server hostname or IP address |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--port {port}
Description | Directory Server port number |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-Z
--useSSL
Description | Use SSL for secure communication with the server |
-q
--useStartTLS
Description | Use StartTLS to secure communication with the server |
This subcommand must be called once before replacing the data for one or more replicating base DNs. You must specify the list of base DNs that will have the data replaced and apply the subcommand to any of the servers taking part in replication of the base DNs. After calling this subcommand, replace the data on one server for the base DNs using import-ldif or restore. Then initialize all other servers in the topology with the initialize subcommand, followed finally by the 'post-external-initialization' subcommand
dsreplication pre-external-initialization --hostname host.example.com \ --port 1389 --baseDN dc=example,dc=com --adminUID admin \ --adminPassword secret
-h {host}
--hostname {host}
Description | Directory Server hostname or IP address |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--port {port}
Description | Directory Server port number |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-Z
--useSSL
Description | Use SSL for secure communication with the server |
-q
--useStartTLS
Description | Use StartTLS to secure communication with the server |
Remove an offline defunct server from a replication topology
dsreplication remove-defunct-server --hostname host.example.com --port 1389 \ --adminUID admin --adminPassword secret --no-prompt --defunctHost deadhost \ --defunctPort 2389 --defunctReplPort 2989
-h {host}
--hostname {host}
Description | Directory Server hostname or IP address |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--port {port}
Description | Directory Server port number |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-Z
--useSSL
Description | Use SSL for secure communication with the server |
-q
--useStartTLS
Description | Use StartTLS to secure communication with the server |
-t {defunctReplicationPort}
--defunctReplPort {defunctReplicationPort}
Description | Replication port of the defunct server |
Lower Bound | 1 |
Upper Bound | 65535 |
Default Value | 8989 |
Required | No |
Multi-Valued | No |
-O {defunctHost}
--defunctHost {defunctHost}
Description | Hostname of the defunct server |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | Yes |
Multi-Valued | No |
-R {defunctPort}
--defunctPort {defunctPort}
Description | LDAP or LDAPS port of the defunct server |
Lower Bound | 1 |
Upper Bound | 65535 |
Default Value | 389 |
Required | No |
Multi-Valued | No |
Display the basic replication configuration information for the base DNs of the servers defined in the registration information. If no base DNs are specified as parameters, the information for all base DNs is displayed
dsreplication status --hostname host.example.com --port 1389 --adminUID admin \ --adminPassword secret --no-prompt
dsreplication status --baseDN dc=example,dc=com --location Austin
dsreplication status --displayServerTable --showAll
-h {host}
--hostname {host}
Description | Directory Server hostname or IP address |
Default Value | ci-release-01.austin-eng.ping-eng.com |
Required | No |
Multi-Valued | No |
-p {port}
--port {port}
Description | Directory Server port number |
Default Value | 389 |
Required | No |
Multi-Valued | No |
-Z
--useSSL
Description | Use SSL for secure communication with the server |
-q
--useStartTLS
Description | Use StartTLS to secure communication with the server |
-r {setName}
--setName {setName}
Description | Display status for the provided replication set names only |
Required | No |
Multi-Valued | Yes |
-l {location}
--location {location}
Description | Display status for the provided locations only |
Required | No |
Multi-Valued | Yes |
-S
--displayServerTable
Description | Include the Replication Server status table in the output |
-a
--showAll
Description | Include all optional columns in the output |
-V
--version
Description | Display Directory Server version information |
-H
--help
Description | Display general usage information |
--help-debug
Description | Display help for using debug options |
Advanced | Yes |
--help-subcommands
Description | Display all subcommands |
--useNoSecurity
Description | Use no security when communicating with the server |
-o {name=value}
--saslOption {name=value}
Description | SASL bind options |
Required | No |
Multi-Valued | Yes |
-X
--trustAll
Description | Trust all server SSL certificates |
-P {truststorePath}
--trustStorePath {truststorePath}
Description | Certificate truststore path |
Required | No |
Multi-Valued | No |
-T {truststorePassword}
--trustStorePassword {truststorePassword}
Description | Certificate truststore PIN |
Required | No |
Multi-Valued | No |
-U {path}
--trustStorePasswordFile {path}
Description | Certificate truststore PIN file |
Required | No |
Multi-Valued | No |
-K {keystorePath}
--keyStorePath {keystorePath}
Description | Certificate keystore path |
Required | No |
Multi-Valued | No |
-W {keystorePassword}
--keyStorePassword {keystorePassword}
Description | Certificate keystore PIN |
Required | No |
Multi-Valued | No |
-u {keystorePasswordFile}
--keyStorePasswordFile {keystorePasswordFile}
Description | Certificate keystore PIN file |
Required | No |
Multi-Valued | No |
-N {nickname}
--certNickname {nickname}
Description | Nickname of the certificate for SSL client authentication |
Required | No |
Multi-Valued | No |
--propertiesFilePath {propertiesFilePath}
Description | Path to the file that contains default property values used for command-line arguments |
Required | No |
Multi-Valued | No |
--noPropertiesFile
Description | Specify that no properties file will be used to get default command-line argument values |
--script-friendly
Description | Use script-friendly mode |
-b {baseDN}
--baseDN {baseDN}
Description | Base DN of the data to be replicated, initialized, or have replication disabled |
Required | No |
Multi-Valued | Yes |
-I {adminUID}
--adminUID {adminUID}
Description | User ID of the global administrator used to bind to the server. For the 'enable' subcommand, if no global administrator was defined previously on any of the servers, the global administrator will be created using the provided data. |
Default Value | admin |
Required | No |
Multi-Valued | No |
-w {bindPassword}
--adminPassword {bindPassword}
Description | The global administrator password |
Required | No |
Multi-Valued | No |
-j {bindPasswordFile}
--adminPasswordFile {bindPasswordFile}
Description | The file containing the password of the global administrator |
Required | No |
Multi-Valued | No |
-n
--no-prompt
Description | Use non-interactive mode. If data in the command is missing, you will not be prompted and the tool will fail |
-Q
--quiet
Description | Perform a quiet operation (no progress information is written to the standard output) |
--ignoreWarnings
Description | Tool should continue should warnings occur when used non-interactively. This option should be used with caution |
--ignoreLock
Description | Tool should continue even if the replication topology has been locked by another tool invocation. This option should be used with caution |