You are not logged in.
SetBackupPolicy
This API is used to set an automated backup policy.
Name | Type | IN | Mandatory | Description |
---|---|---|---|---|
x-auth-token | string | header | Yes | Specifies the user token obtained from the IAM service. |
instance_id | string | path | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances and details. If you do not have an instance, you can call the API used for creating an instance. |
project_id | string | path | Yes | Specifies the project ID of a tenant in a region. |
Name | Type | Mandatory | Description |
---|---|---|---|
backup_policy | BackupPolicy object | Yes | Specifies the backup policy object, including the backup retention period (days) and start time. |
Name | Type | Mandatory | Description |
---|---|---|---|
keep_days | string | Yes | Specifies the number of days to retain the generated backup files.The value range is from 0 to 732. The value 0 indicates that the automated backup policy is disabled. |
start_time | string | No | Specifies the backup time window. Automated backups will be triggered during the backup time window. This parameter is mandatory if the automated backup policy is enabled. This parameter is not transferred if the automated backup policy is disabled. The value must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format.
|
period | string | No | Specifies the backup cycle configuration. Data will be automatically backed up on the selected days every week. Value range: The value is a number separated by DBS case commas (,). The number indicates the week. The restrictions on the backup retention period are as follows:
|
Success.
Client or server error.
Name | Type | Description |
---|---|---|
error_code | string | Specifies the error returned when a task submission exception occurs. |
error_msg | string | Specifies the description of the error returned when a task submission exception occurs. |
Enable or modify an automated backup policy.
"PUT https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/3d39c18788b54a919bab633874c159dfin02/backups/policy"
{
"backup_policy": {
"keep_days": 9,
"start_time": "08:15-09:15",
"period": "1,4,5,6,7"
}
}
Disable an automated backup policy.
"PUT https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/3d39c18788b54a919bab633874c159dfin02/backups/policy"
{
"backup_policy": {
"keep_days": 0
}
}