Manage Backup Configuration
This method lets you get and set the rotation size for Backup Service history.
HTTP Methods and URIs
Get the current rotation configuration:
GET /api/v1/config
Apply a new configuration:
POST /api/v1/config
Name | Description | Schema |
---|---|---|
|
The maximum size of the backup history can grow to before the Backup Service starts removing older history. |
Integer value between 5 and 200 |
Curl Syntax
curl -X GET http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT/api/v1/config -u $USERNAME:$PASSWORD curl -X POST http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT/api/v1/config -u $USERNAME:$PASSWORD -d '{"history_rotation_size":$HISTORY_ROTATION_SIZE}'
Required Permissions
To call this method via GET: Full Amin, Backup Admin, or Read-Only Admin.
To call this method via POST: Full Admin or Backup Admin.
Responses
Value | Description |
---|---|
|
Successful call. |
|
Returned when trying to set the rotation size to an invalid value. |
|
Authorization failure due to incorrect username or password. |
|
The provided username has insufficient privileges to call this method. |
Examples
The following call returns the current configuration limits:
curl -v -X GET http://127.0.0.1:8097/api/v1/config \ -u Administrator:password
If successful, the call returns 200 OK
, and the following object:
{"history_rotation_size":50}
The following call modifies the rotation size:
curl -v -X POST http://127.0.0.1:8097/api/v1/config -u Administrator:password \ -d '{"history_rotation_size":51}'
Success returns 200 OK
.
See Also
-
For an overview of the Backup Service, see Backup Service.
-
For a step-by-step guide to using Couchbase Server Web Console to configure and use the Backup Service, see Manage Backup and Restore.