A newer version of this documentation is available.

View Latest

Delete a Backup

      +
      The Backup Service REST API supports the deletion of backups, from a specified, active repository.

      HTTP Methods and URIs

      DELETE /cluster/self/repository/active/<repository-id>/backups/<backup-id>

      Description

      Deletes a specified backup, within a specified, active repository.

      Curl Syntax

      curl -X DELETE http://<backup-node-ip-address-or-domain-name>:8097/\
        cluster/self/repository/active/<repository-id>/backups/<backup-id>
        -u <username>:<password>

      The username and password must identify an administrator with the Full Admin role. The repository-id and backup-id arguments must respectively specify the name of an active repository defined on the cluster, and the name of a backup within that repository.

      Responses

      Success returns 200 OK. Incorrect specification of backup-id returns 500 Internal Server Error, and a message such as the following: {"status":500,"msg":"could not remove backup","extras":"exit status 1:Removing backup repository failed: backup name provided is not one of the backups in this repository\n"}. Incorrect specifiection of repository-id returns 404 Object Not Found, and a message such as the following: {"status":404,"msg":"the repository does not exist"}.

      Failure to authenticate returns 401 Unauthorized. An incorrectly specified URI returns 404 Object Not Found.

      Examples

      The following call deletes a specified backup within the active repository testRepo:

      curl -v -X DELETE http://127.0.0.1:8097/api/v1/cluster/self/\
      repository/active/testRepo/backups/2020-09-29T21_00_36.511305+01_00 \
      -u Administrator:password

      If successful, the call returns 200 OK, and the specified backup is deleted.

      See Also

      An overview of the Backup Service is provided in Backup Service. A step-by-step guide to using Couchbase Web Console to configure and use the Backup Service is provided in Manage Backup and Restore.