Perform an Immediate Prune
The Backup Service REST API allows an immediate prune to be triggered.
Description
Triggers an immediate pruning of backups for the specified active repository. As a result, the need to wait for a scheduled pruning can be skipped when necessary.
Curl Syntax
curl -X POST http://<backup-node-ip-address-or-domain-name>:8097/cluster/self\ /repository/active/<repository-id>/prune \ -u <username>:<password>
The username
and password
must identify an administrator with the Full Admin role.
The repository-id
must be the name of an active repository on the cluster.
Responses
Value | Description | Value example |
---|---|---|
|
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. |
|
Example
The following example requests an immediate pruning for the repoNewForPrune
active repository:
curl -v -X POST http://127.0.0.1:8097/api/v1/cluster/self/\ repository/active/repoNewForPrune/prune \ -u Administrator:password \ -d '{"full_backup": true}' | jq
If successful, the call returns 200 OK
, and a message similar to the following:
[ { "task_name": "PRUNE-975564a7-f6c2-491e-8488-ef2cdcffb0a6" } ]
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.
-
For information on scheduling pruning tasks, see Schedule Pruning.
-
For information on backup retention, see Retain Backups.