A summary of the dsreplication subcommands and functions is presented in the table below.
Removes replication-related artifacts from the configuration, schema as well as the server registry while the local server is offline. The subcommand does not remove references to this server from other replicas and replication servers in the topology. Therefore, it is recommended to remove this server first from the replication topology either by using the disable or 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, logs/cleanup-backends.ldif 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 the --excludeReplication option of the export-ldif command. The resulting LDIF file can be re-imported using the import-ldif command. For example:
$ bin/export-ldif --backendID userRoot --excludeReplication \ --ldifFile cleansed.ldif $ bin/import-ldif --backendID userRoot --ldifFile cleansed.ldif
Exporting using the --excludeReplication option of the export-ldif command will also remove the replica state from the output. The LDIF created by the cleanup-local-server subcommand does not need to be applied after the server is restarted.
|disable||Disables 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.|
|enable||Updates 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).|
|initialize||Initializes the data under the specified base DN on the destination server with the contents on the source server.|
|initialize-all||Initializes the data under the specified base DN on all servers in the replication topology with the contents on the specified server.|
|post-external-initialization||Used with pre-external-initialization, the command resets the generation ID based on the newly-loaded data. This subcommand must be called after initializing the contents of all the replicated servers using the import-ldif tool or dsreplication initialize. Specify the list of base DNs that have been initialized and provide the credentials of any of the servers that are being replicated. See the usage of the pre-external-initialization subcommand for more information. This subcommand only needs to be run on one of the replicas once.|
|pre-external-initialization||Clears the existing generation ID and removes all accumulated changes of the replicated suffix from the replication changelog database at each and every replication server. This subcommand should be used when globally restoring the replicas on all of the servers in a topology. You must specify the list of base DNs that will be initialized and provide the credentials of any of the servers that are being replicated. After calling this subcommand, initialize the contents of all the servers in the topology, then call the post-external-initialization subcommand. This subcommand only needs to be run on one of the replicas once.|
|remove-defunct-server||Removes an offline defunct server from the replication on all servers in the topology.|
Displays the status of replication domains. If no base DNs are specified as parameters, the information for all base DNs is displayed. Available options with the status subcommand are: --showAll, --displayServerTable, --location.