9.3.3. Stopping Replication

How you stop replication depends on whether the change is meant to be temporary or permanent.

Procedure 9.4. To Stop Replication Temporarily For a Replica

If you need to stop a server from replicating temporarily, you can do so using dsconfig command.

[Warning] Warning

Do not allow modifications on the replica for which replication is disabled, as no record of such changes is kept, and the changes cause replication to diverge.

  1. Disable the multimaster synchronization provider.

    $ dsconfig
     set-synchronization-provider-prop
     --port 4444
     --hostname opendj2.example.com
     --bindDN "cn=Directory Manager"
     --bindPassword password
     --provider-name "Multimaster Synchronization"
     --set enabled:false
     --trustAll
     --no-prompt
  2. When you are ready to resume replication, enable the multimaster synchronization provider.

    $ dsconfig
     set-synchronization-provider-prop
     --port 4444
     --hostname opendj2.example.com
     --bindDN "cn=Directory Manager"
     --bindPassword password
     --provider-name "Multimaster Synchronization"
     --set enabled:true
     --trustAll
     --no-prompt

Procedure 9.5. To Stop Replication Permanently For a Replica

If you need to stop a server from replicating permanently, for example in preparation to remove a server, you can do so with the dsreplication disable command.

  1. Stop replication using the dsreplication disable command.

    $ dsreplication
     disable
     --disableAll
     --port 4444
     --hostname opendj2.example.com
     --bindDN "cn=Directory Manager"
     --adminPassword password
     --trustAll
     --no-prompt
    Establishing connections ..... Done.
    Disabling replication on base DN cn=admin data of server
     opendj2.example.com:4444 ..... Done.
    Disabling replication on base DN dc=example,dc=com of server
     opendj2.example.com:4444 ..... Done.
    Disabling replication on base DN cn=schema of server
     opendj2.example.com:4444 ..... Done.
    Disabling replication port 8989 of server
     opendj2.example.com:4444 ..... Done.
    Removing registration information ..... Done.
    Removing truststore information ..... Done.
    
    See
    /var/.../opends-replication-125248191132797765.log
    for a detailed log of this operation.

    The dsreplication disable as shown completely removes the replication configuration information from the server.

  2. If you want to restart replication for the server, you need to run the dsreplication enable and dsreplication initialize commands again.