Delete a Backup
The Backup Service REST API supports the deletion of backups, from 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>
-d '{"disable_safe_remove_check": <true|false>}'
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.
The disable_safe_remove_check parameter is optional.
It allows you to delete a backup that has incremental backups depending on it.
-
If set to
true, the Backup Service won’t check if the backup is safe to delete. If the selected backup has dependent incremental backups, the Backup Service will delete the backup without warning. -
If set to
false, the Backup Service checks if the backup is safe to delete before proceeding. The Backup Service checks if the selected backup has dependent incremental backups. The default value isfalse.
Setting disable_safe_remove_check to true can break backup cycles and make dependent backups invalid.
|
Responses
| Value | Description |
|---|---|
|
Successful call. |
|
Invalid parameter. |
|
The repository in the endpoint URI does not exist. |
|
Authorization failure due to incorrect username or password. |
|
The provided username has insufficient privileges to call this method. |
|
Error in the URI path. |
|
Error in Couchbase Server. |
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
-d '{"disable_safe_remove_check": true}'
If successful, the call returns 200 OK, and the specified backup is deleted.
See Also
-
For information about deleting backups from the UI, see Delete Backups.
-
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.