A newer version of this documentation is available.

View Latest

Delete a Replication

      +
      Deleting an XDCR replication stops the replication of data, and removes the defined replication from Couchbase Server.

      Examples on This Page

      The examples in the subsections below show how to delete a replication; using the UI, the CLI, and the REST API respectively. As their starting-point, the examples assume the scenario that concluded the page Resume a Replication.

      Delete an XDCR Replication with the UI

      Proceed as follows:

      1. Access Couchbase Web Console. Left-click on the XDCR tab, in the right-hand navigation menu.

        left click on xdcr tab

        This displays the XDCR Replications screen. The lower part of the main panel features an Outgoing Replications panel that currently has the following appearance:

        xdcr outgoing replications with replication

        This features information on a single, currently defined replication. In the status column, this replication is shown to be Replicating.

      2. To delete the replication, left-click on the row for the replication. When the Delete button appears, left-click on it:

        left click on delete replication tab

        The following confirmation dialog is now displayed:

        xdcr confirm delete

        Left-click on Delete Replication, to confirm. The Outgoing Replications panel now reappears, showing no replications:

        xdcr outgoing replications initial

      The replication has now been deleted.

      Delete an XDCR Replication with the CLI

      From the starting-point defined above, in Examples on This Page, use the xdcr-replicate command to delete an XDCR replication as follows.

      couchbase-cli xdcr-replicate -c 10.142.180.101 \
      -u Administrator \
      -p password \
      --delete \
      --xdcr-replicator=570d0ca2db3b1e128e2fafd362a1bfd4/travel-sample/travel-sample

      The value specified for the --xdcr-replicator flag is that retrieved by means of the --list flag, shown in Pause an XDCR Replication with the CLI. The --delete flag signifies that the replication is to be deleted. If successful, the command returns the following:

      SUCCESS: XDCR replication deleted

      Delete an XDCR Replication with the REST API

      From the starting-point defined above, in Examples on This Page, use the REST API to delete an XDCR replication as follows.

      curl -X DELETE -u Administrator:password  \
      http://10.142.180.101:8091/controller/cancelXDCR/570d0ca2db3b1e128e2fafd362a1bfd4%2Ftravel-sample%2Ftravel-sample

      Note the encoded form of the endpoint, which is required. This consists of the id, the name of the source bucket, and the name of the target bucket. These were obtained in Pause an XDCR Replication with the REST API.

      If the call is successful, no output is displayed. The replication has been deleted.

      Next Steps

      Once a replication has been deleted, you may also wish to delete the reference on which it was based. See Delete a Reference.