Manage Replications

    +
    Configure XDCR to replicate data between source and destination buckets. An XDCR replication allows bucket data to be replicated continuously from a specified bucket on a source cluster to a specified bucket on a target cluster.

    An XDCR replication is created on the cluster that is to be the source of the data-replication. This cluster is known as the source cluster, and it contains the data that you want to replicate. Each replication targets a bucket on a different cluster, known as the destination cluster, in which the data will be replicated.

    Accessing Replications in the Couchbase Cloud UI

    Replications can be viewed by any user with Project View privileges for the project that contains the cluster. However, replications can only be managed by users with Project Edit privileges.

    Replications can be viewed and managed under the source cluster’s Replications tab. A summary of all the replications for which the cluster is the source is displayed in table format.

    A cluster’s 'Replications' tab showing a table of multiple replications.
    Replications for which the the cluster is the destination are not displayed, unless those replications are bidirectional. Bidirectional replications appear under the Replications tab of both the source and destination clusters, since each cluster is the source of one direction of the replication.

    Replications Summary

    A cluster’s Replications tab shows a summary of all the replications for which the cluster is the source. The summary is displayed in table format, with sortable columns and a row for each replication.

    The replications summary displays the following information about each replication:

    Source Project/Cluster

    The name of the cluster that is the source of the replication (the current cluster), and the name of the project that contains the cluster.

    Buckets

    The names of the source and destination buckets are displayed, along with arrows indicating the direction of the replication. The source bucket is displayed on the left, and the destination bucket is displayed on the right. One of the arrows between the source and destination buckets will be highlighted, indicating the direction of the replication. When both arrows are highlighted, it indicates that the replication is bidirectional.

    Destination Project/Cluster

    The name of the cluster that is the destination of the replication, and the name of the project that contains that cluster.

    Status

    The current state of the replication. The normal state is Replicating, which indicates the replication is active and replicating bucket data changes.

    A Pause/Play icon is displayed at the end of each row, which can be used to pause or resume the replication.

    Create a Replication

    To create a replication, you must have Project Edit privileges for the projects that contain both the source and destination clusters.

    The source and destination buckets must have the same conflict resolution method configured. If the buckets use different conflict resolution methods, then the replication will fail to be created.
    1. Go to the source cluster’s Replications tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that is to be the source of the replication.

        This opens the cluster with its Overview tab selected.

      3. Click the Replications tab.

    2. Click Add Replication. (If no replications are configured on the cluster, click Setup Replication.)

      This opens the Setup Replication fly-out menu.

    3. Select the destination cluster.

      Click the Destination Cluster drop-down menu and select the cluster that contains the destination bucket that you wish to replicate data to.

      Any cluster that is contained within a project in which you have Project Edit privileges is available for selection (this also includes any self-managed clusters that are connected within those projects). The current cluster is also available for selection for the purposes of setting up intra-cluster XDCR.

    4. Select a source bucket.

      Click the Source Bucket drop-down menu and select the source bucket for the replication.

      All of the buckets on the current cluster are available for selection. The bucket you select will be the bucket from which data is replicated.

    5. Select a destination bucket.

      Click the Destination Bucket drop-down menu and select the destination bucket for the replication.

      All of the buckets on the destination cluster are available for selection. The bucket you select will be the bucket to which data is replicated.

      The destination bucket must be configured with the same conflict resolution method as the source bucket, otherwise the replication will fail to be created.
    6. (Optional) Make the replication bidirectional.

      Selecting the Bidirectional checkbox means that the source and target buckets will each be configured with a unidirectional replication to each other. Refer to Replication Direction for more information.

    7. (Optional) Add a filter expression.

      A filter expression allows a limited subset of documents to be replicated from the source bucket.

      To add a filter expression:

      1. Enter the expression in the Filter Expression field.

        A filter expression can be formatted as either a regular expression (regex) or an XDCR filtering expression.

      2. Test the expression against a specified document.

        In the Test Key field, enter the key/ID of a document that you expect to be included by the filter.

        An expression must be tested successfully before it can be included as part of the replication. If an expression is specified without having been tested, the expression is ignored when the replication is saved; and the replication is thus started in unfiltered form.
    8. Once you’re satisfied with the configuration, click Save.

      The fly-out menu will close and the replication will appear in the summary table. Once the status of the replication changes to Replicating, data will immediately start replicating from the source bucket to the destination bucket.

    Pause a Replication

    Pausing an XDCR replication temporarily suspends the replication of data from the source bucket to the target. Pausing a replication always occurs on the source cluster.

    To pause a replication, you must have Project Edit privileges for the project that contains the source cluster.

    When pausing a bidirectional replication, only the replication from the current cluster will be paused. To pause both directions of a bidirectional replication, you will need to pause the replication on both clusters individually.
    1. Go to the source cluster’s Replications tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that is the source of the replication that you wish to pause.

        This opens the cluster with its Overview tab selected.

      3. Click the Replications tab.

    2. Find the replication that you wish to pause, and click the Pause icon at the end of the row on the right side.

      The Status field will indicate that the replication is in the process of being paused, before eventually entering a Paused state.

    Resume a Replication

    After an XDCR replication has been paused, resuming it restarts the replication of data from the source bucket to the target.

    To resume a replication, you must have Project Edit privileges for the project that contains the source cluster of the paused replication.

    1. Go to the source cluster’s Replications tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that is the source of the paused replication.

        This opens the cluster with its Overview tab selected.

      3. Click the Replications tab.

    2. Find the paused replication that you wish to resume, and click the Play icon at the end of the row on the right side.

      Once the status of the replication changes to Replicating, data replication resumes from the source bucket to the destination bucket.

    Modify a Replication

    Replications cannot be modified after creation. To make changes to a replication — for example, to add a filter — you will need to create a new replication with the desired configuration (and delete the old replication, if desired).

    Delete a Replication

    Deleting an XDCR replication stops the replication of data, and removes the defined replication from the cluster.

    To delete a replication, you must have Project Edit privileges for the projects that contain both the source and destination clusters.

    If the replication is bidirectional, both directions of the replication are deleted and duly removed from the Replications tab of both clusters.
    1. Go to the source cluster’s Replications tab. (If the replication is bidirectional, you can go to the Replications tab of either cluster.)

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that is the source of the replication that you wish to delete.

        This opens the cluster with its Overview tab selected.

      3. Click the Replications tab.

    2. Find the replication that you wish to delete, and click on its row.

      This opens the Edit Replication fly-out menu.

    3. Click Delete.

    4. When prompted to confirm the deletion, click Confirm.

      The replication is deleted, and any new changes in the source bucket are no longer replicated to the destination bucket.