XDCR Management Overview
Cross Datacenter Replication (XDCR) provides an easy way to replicate data from one cluster to another.
What is XDCR?
Cross Data Center Replication (XDCR) replicates data between clusters: this provides protection against data-center failure, and also provides high-performance data-access for globally distributed, mission-critical applications.
XDCR replicates data from a specific bucket on the source cluster to a specific bucket on the target cluster. Data from the source bucket is pushed to the target bucket by means of an XDCR agent, running on the source cluster, using the Database Change Protocol. Any bucket (Couchbase or Ephemeral) on any cluster can be specified as a source or a target for one or more XDCR definitions.
A complete architectural description of XDCR is provided in Cross Data Center Replication (XDCR). You may wish to familiarize yourself with the information provided there, before performing the routines provided in this section.
What XDCR Tasks Can Be Performed?
Management of XDCR includes the following:
Preparation: Make sure that you have appropriate permissions for managing XDCR. Check platform sizes, configurations, and ports. Details are provided in Prepare for XDCR.
Reference management: Remote clusters must be registered as targets for XDCR. This requires appropriate administration credentials for the remote cluster, and the existence on that cluster of one or more buckets that can be specified as recipients of replicated data. Information on establishing references is provided in Create a Reference; and information on deleting them in Delete a Reference.
Replication management: Once a reference has been registered on the local cluster, it can be specified as the target for a replication. This requires that an existing source and an existing target bucket also be specified. Optionally, filters can be established, so that only documents with matching ids, fields, values, or extended attributes are replicated. Additionally, advanced settings can be configured, to ensure optimal performance. Information on establishing replications is provided in Create a Replication; and information on deleting them in Delete a Replication.
Pausing and Resuming replications: Once started, a replication is continuous; mutations on the source being constantly transmitted to the target. Occasionally, for purposes of system maintenance, it may be desirable manually to pause a replication, and then resume it. Information is provided in Pause a Replication; and Resume a Replication.
Monitoring: The rate and quantity of mutations transmitted by XDCR can be observed, by means of the Couchbase Web Console, the CLI, and the REST API. This is described in Monitoring XDCR.
Recovering Data: In the event of data-loss, the cbrecovery tool can be used to restore data. The tool accesses remotely replicated buckets, previously created with XDCR, and copies appropriate subsets of their data back onto the original source-cluster. Information is provided in Recover Data with XDCR.
How to Use This Section
This section is divided into multiple subsections, each of which presents step-by-step examples of how to perform a particular XDCR management task. In most subsections, three examples are provided, showing how to perform the same task with Couchbase Web Console, CLI, and REST API respectively. The subsections are arranged in a sequence, to make it easy to start from the first example, Prepare for XDCR, and proceed to the last.