Manage Replications
- Capella Operational
Use the procedures on this page to create and manage XDCR (Cross Data Center Replication) with Capella operational clusters.
Configure XDCR to replicate data between source and destination buckets. XDCR continuously replicates bucket data from a specified bucket on a source cluster to a specified bucket on a target cluster. For general information about XDCR in Capella and how it works, see Cross Data Center Replication (XDCR).
Prerequisites
-
To view and manage replications on a cluster, you need the
Project Ownerrole for your source cluster. -
To delete or create a new replication, you need the
Project Ownerrole for the projects that contain your source cluster and destination cluster. -
You have created a single node or multi-node cluster that you want to use for replication, either as a source or destination cluster.
| Replication on single node clusters is only supported for development or test use cases. |
View Your Replications
To view and manage replications:
-
In the navigation breadcrumbs in the Capella UI, do 1 of the following:
-
Click your organization name and go to Operational.
-
Click your current project name or search for a project and go to Operational.
-
Expand the cluster breadcrumb and search for a cluster.
-
-
Select the cluster where you want to view and manage replications.
-
Go to .
If you have not set up a replication for your cluster, you can click Set Up Replication. For more information about adding Self-Managed Targets, see Create a Replication from Capella to a Self-Managed Cluster.
If you have already created replications for your cluster, you’ll see a summary of your replications in a table. For an example, see Observe an Ongoing Replication.
Create a Replication
| Source and destination buckets must have the same conflict resolution method configured. If your source and destination buckets use different conflict resolution methods, then you cannot create a replication. |
Data replication can be between:
-
An operational cluster to a self-managed cluster. A self-managed cluster can be in an on-premises datacenter or in your own cloud.
Clusters hosted by Couchbase Capella support the following replications:
-
Capella Hosted (AWS) ←→ Capella Hosted (AWS)
-
Capella Hosted (AWS) ←→ Own Cloud (AWS, GCP, or Azure)
-
Capella Hosted (AWS) ←→ On-Premises
-
Capella Hosted (GCP) ←→ Capella Hosted (GCP)
-
Capella Hosted (GCP) ←→ Own Cloud (GCP, AWS, or Azure)
-
Capella Hosted (GCP) ←→ On-Premises
-
Capella Hosted (Azure) ←→ Capella Hosted (Azure)
-
Capella Hosted (Azure) ←→ Own Cloud (Azure, AWS, or GCP)
-
Capella Hosted (Azure) ←→ On-Premises
Create a Replication Between Operational Clusters
|
Replication Security
Replications between Capella operational clusters are secured by default. |
To create a replication between 2 operational clusters:
-
On the Replication page, click Set Up Replication.
-
Choose to create a One-way or a Two-way replication. A one-way replication replicates data only from the source to the target. A two-way replication replicates data both from the source to the target, and from the target to the source.
-
Choose your target cluster from the Target Cluster menu. Your target cluster must be within the same cloud service provider (CSP) as your destination cluster.
-
Under Select Buckets, choose the Source Bucket and Target Bucket to use in the replication.
-
To enable bi-directional replication with Sync Gateway (App Services), select Enable Active-Active XDCR with App Services.
This option allows creating a replication with App Services 4.0+ app endpoints linked to both source and target buckets. When creating the replication, Capella:
-
Enables the bucket property Cross Cluster Versioning on both source and target buckets, if it’s not already set.
-
Sets the replication flag
mobiletoActivefor all legs of the replication.This option is only available when both source and target clusters use Couchbase Server version 7.6.6+ and linked App Services use version 4.0+.
-
-
To add a filter to your replication, under Filter Replication, click Enable:
-
In the Filter Expression field, enter a regex pattern or SQL++ statement to use to filter documents from your replication.
For example, to only replicate documents that contain the value
Francefor the keycountry, enter the expressionREGEXP_CONTAINS(country, "France").The expression must contain at least 2 keys.
-
Click Check Syntax to verify the syntax of your expression.
-
-
(Optional) If you added a filter expression, use the Test Document panel to test your filter:
-
From your source bucket, choose a scope, collection, and enter a document ID value for a document you want to use in your test.
-
Click Test Document to run the test.
-
-
Choose your Deletion Filters.
For more information about deletion filters, see Deletion Filters in the Server documentation.
-
If your operational cluster is on Couchbase Server version 7.2.2 or later, choose whether to Filter Binary Documents.
For more information about filtering binary documents from XDCR, see Filtering Binary Documents in the Server documentation.
-
Choose a High, Medium, or Low Replication Priority. For more information about each option, see XDCR Priority. A setting only takes effect if there are multiple replications with different priorities.
-
To set a network usage limit, under Set Network Usage Limit, click Enable. Enter a limit in MiB per second for the maximum network usage of this replication.
This limit applies to all replications for your source cluster. -
(Optional) If you want to replicate all scopes and collections on your source cluster to your target cluster, under Replicate All Scopes and Collections, click Yes.
To replicate your scopes and collections, each scope and collection must already exist with the same name on the source and target buckets. If you want to replicate documents to a different target scope and collection from your source, click No. -
In the Source Name list, choose a scope and then a specific collection on your source cluster to replicate.
-
In the Target Name list, choose the scope and specific collection on your target cluster to receive the replicated documents.
-
(Optional) To add another scope and collection pairing on your source and target clusters, click Add Source and Target.
-
-
To start the replication, click Setup Replication.
It may take some time for your replication to be set up and start replicating documents.
| Bi-directional XDCR with Sync Gateway requires Server versions 7.6.6+, and Sync Gateway (App Services) versions 4.0+. |
Create a Replication to Capella from a Self-Managed Cluster
Replicate your data to an operational cluster from a self-managed cluster that’s in an on-premises datacenter or a non-Capella cloud.
To set up XDCR from a self-managed cluster to an operational cluster:
Create a Cluster Access Credential in Your Operational Cluster
To create a cluster access credential in your operational cluster, see Configure Cluster Access Credentials.
Secure Your Replication
Replication security varies based on your source and destination cluster deployment configurations. For more information, see Manage Replication Security.
To secure your replication, choose to connect using 1 of the following options:
-
Public Internet
-
VPC Peering
-
Private Endpoint
To route your replication through the public Internet, you must add the IP address of the self-managed cluster Data Service nodes to the Allowed IP list of the operational cluster.
To add the public IP of the VM to the Allowed IP list of your operational cluster:
-
Get the public IP from your VM:
-
sshinto the VM where Couchbase Server is running.# dig +short myip.opendns.com @resolver1.opendns.com67.212.150.204
-
-
Add an Allowed IP address to your operational cluster. For more information, see Add an Allowed IP Address.
To route your replications through a peered VPC network:
-
Configure a VPC Peering Connection. For more information, see Configure a VPC Peering Connection.
For more information about routing your replication through a peered VPC network, see Replicate Data Over a VPC Peering Connection.
| XDCR over private endpoints is only available upon request from Support. |
To route your replication through a private endpoint connection, see Replicate Data Over a Private Endpoint.
Get the Hostname to Use in the XDCR Remote Cluster Reference
To get the hostname to use in the XDCR remote cluster reference:
-
In the Capella UI, go to Operational and select your cluster name.
-
Choose 1 of the following options. If your replication is traveling through:
-
A peered VPC network or the public Internet, go to and copy the Public Connection String without the
couchbases://prefix. The public connection string is also the DNS SRV of the cluster.Although the connection string is sometimes referred to as the "public connection string," if you have VPC peering set up the connection string resolves to private addresses. For more information, see Configure a VPC Peering Connection. -
A private endpoint, go to and copy the Private Endpoint DNS.
-
Copy Your Operational Cluster’s Security Certificate
To copy your operational cluster’s security certificate:
-
In the Capella UI, go to Operational and select your cluster name.
-
Go to .
-
Click Copy.
Set Up XDCR Remote Reference
| XDCR compatibility can vary between different versions of Couchbase Enterprise Server. To view and confirm compatibility, see XDCR Compatibility. |
To set up your XDCR remote reference, choose the Couchbase Server version of your self-managed cluster:
-
Couchbase Server 8.X or later
-
Couchbase Server 7.X
To setup an XDCR remote reference:
-
Go to the Couchbase Server Web Console.
-
Go to XDCR and click Add Replication.
-
Enter the following information for each field:
Cluster Name
Any name
IP/Hostname
The connection string from Get the Hostname to Use in the XDCR Remote Cluster Reference. As the hostname saves as a DNS SRV string in Couchbase Server 7.X and later, you do not need to specify a port.
If you’re using the Public Connection String, remove the
couchbases://prefix.Username for Remote Cluster
Cluster credentials from Create a Cluster Access Credential in Your Operational Cluster.
Password
Cluster credentials from Create a Cluster Access Credential in Your Operational Cluster.
Certificate
Paste the security certificate copied in Copy Your Operational Cluster’s Security Certificate.
Network Type
If your replication is traveling through:
-
The public Internet or a peered VPC network, select Auto.
-
A private endpoint, select Force using alternate address.
-
-
Complete the setup for your replication.
For more information about how to set up a replication in Couchbase Server, see Create a Replication in the Couchbase Server documentation.
If you’re securing your replication over a private endpoint, you can only setup the XDCR remote reference using the REST API.
In your curl Syntax, you must set the hostname as the Private Endpoint DNS and network type as network_type=external.
|
To setup an XDCR remote reference:
-
Go to the Couchbase Server Web Console.
-
Go to XDCR and click Add Replication.
-
Enter the following information for each field:
Cluster Name
Any name
IP/Hostname
The connection string from Get the Hostname to Use in the XDCR Remote Cluster Reference. As the hostname saves as a DNS SRV string in Couchbase Server 7.X and later, you do not need to specify a port.
If you’re using the Public Connection String, remove the
couchbases://prefix.Username for Remote Cluster
Cluster credentials from Create a Cluster Access Credential in Your Operational Cluster.
Password
Cluster credentials from Create a Cluster Access Credential in Your Operational Cluster.
Certificate
Paste the security certificate copied in Copy Your Operational Cluster’s Security Certificate.
-
Complete the setup for your replication.
For more information about how to set up a replication in Couchbase Server, see Create a Replication in the Couchbase Server documentation.
Create a Replication from Capella to a Self-Managed Cluster
Replicate your data from an operational cluster to a self-managed cluster that’s in an on-premises datacenter or a non-Capella cloud.
|
Replication Security
Security options for self-managed XDCR replications vary based on the source and destination cluster deployment configurations. For replications from a Capella operational cluster to a self-managed cluster, you can choose to connect through: For more information, see Manage Replication Security. |
To configure the replication, the Capella administrator must have the following:
-
The CA of the self-managed cluster.
-
Either of the following:
-
The username and password for the self-managed cluster.
-
A client certificate and private key provided for client access to the self-managed cluster.
-
Additionally, the self-managed cluster must be network-accessible to Capella. Ensure that:
-
The target cluster is accessible via the SSL ports 18091, 18092, and 11207.
-
Each Data Service node on the operational cluster can connect to each Data Service node on the self-managed target.
-
All target-cluster firewalls allow access to the Capella Data Service nodes.
To replicate data from Capella to a self-managed cluster:
| If you want to view your self-managed target over a private network, set up VPC Peering for the connection before adding your self-managed target. For information, see Configure a Private Network. |
Add a Self-Managed Target
To add a self-managed target:
-
In the navigation breadcrumbs in the Capella UI, do 1 of the following:
-
Click your organization name and go to Operational.
-
Click your current project name or search for a project and go to Operational.
-
Expand the cluster breadcrumb and search for a cluster.
-
-
Select the cluster where you want to set up a self-managed replication target.
-
Go to .
-
Click Add Self-Managed Target.
-
Review the configuration information for setting up a self-managed target.
-
In the Target Name field, enter a name for the self-managed target.
-
In the IP/Hostname field, enter the IP address or Fully Qualified Domain Name of the self-managed target.
-
(Optional) If you want to authenticate through a username and password, in the Username for Self-Managed Target and Password fields, enter your admin username and password for the self-managed target.
You must add a username and password unless you authenticate with a client certificate and private key.
-
Choose the Network Type for your connection.
You can use either the alternate or internal network address for your self-managed target, or let Capella decide based on your provided hostname.
For information about specifying internal and alternate addresses, see Using Alternate Addresses and Specifying Addresses.
-
In the TLS Certificate field, paste the CA of the self-managed target.
-
(Optional) If you want Capella to authenticate through a client certificate and private key, click Use Client Certificate Authentication.
-
In the Client Certificate field, paste your client certificate from your self-managed target.
-
In the RSA Private Key field, paste the RSA private key.
-
-
(Optional) To verify the connection to your self-managed target using your provided information, click Check Connection.
-
Click Add Self-Managed Target.
Replicate to a Self-Managed Target
To configure a replication from Capella to a self-managed target:
-
In the navigation breadcrumbs in the Capella UI, do 1 of the following:
-
Click your organization name and go to Operational.
-
Click your current project name or search for a project and go to Operational.
-
Expand the cluster breadcrumb and search for a cluster.
-
-
Select the cluster where you want to set up a new replication.
-
Go to .
-
Click Setup Replication.
-
Choose a One-Way replication direction. You cannot use Two-Way replication with a self-managed target.
-
In the Target Clusters list, select your self-managed target cluster. Clusters in the menu are divided into two groups: Self-Managed and Capella Managed.
-
Under Select Buckets, choose the Source Bucket and Target Bucket to use in the replication.
-
Configure other settings for your replication, such as Filter Documents, Select Replication Priority, Set Network Usage Limit, and Replicate All Scopes and Collections.
-
Click Set Up Replication.
Observe an Ongoing Replication
You can view the details for a current replication at any time from on your cluster.
Pause and Resume a Replication
Pausing an XDCR replication temporarily suspends the replication of data from the source to the target. Pausing a replication always occurs on the source cluster. You can resume a paused replication at any time.
When pausing a bidirectional replication, only the replication from the current cluster will be paused. To pause both directions of a bidirectional replication, you’ll need to pause the replication on both clusters individually.
To pause or resume a replication:
-
On the Replications page, click the Active replication you want to pause, or the Paused replication you want to resume.
-
Under Pause Replication, click Pause Replication or Resume Replication.
Modify a Replication
You can modify specific replication settings after creation. You cannot change:
-
The replication direction.
-
The source cluster, source provider and region, source type, or source bucket.
-
The target cluster, target provider and region, target type, or target bucket.
To modify your replication:
-
On the Replications page, click the replication you want to modify.
-
Modify the following settings:
-
Enable or disable filter replication.
-
Select High, Medium, or Low replication priority.
-
Enable or disable the network usage limit.
-
Choose to replicate all scopes and collections.
-
-
Click Save.
Delete a Replication
Deleting an XDCR replication stops the replication of data, and removes the defined replication from the cluster. The replication process retains all replicated data.
If the replication is bidirectional, deleting the replication on the source cluster removes both directions of the replication from the Replications tab of both clusters.
To delete a replication:
-
On the Replications page, click the replication you want to delete.
-
Under Delete Replication, click Delete Replication.
-
Confirm that you want to delete the replication.
-
Click Delete Replication.
Errors and Other Notifications
If a connectivity issue occurs while replicating to a self-managed target, you’ll see an error under Self-Managed Targets on the Replication page. Connectivity errors appear in the Connectivity Status column.
For all replication types, any errors, warnings, or informational messages can be viewed in more detail from the Errors column under Replications. Click the icon in the Errors column for a listed replication to view error details.