Modifies the backup policy of an instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardbx:UpdateBackupPolicy |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| DBInstanceName |
string |
Yes |
The instance ID. |
pxc-hzjasdyuoo |
| BackupPeriod |
string |
No |
The backup cycle. You must specify at least 2 days. The value is a 7-digit number. From left to right, each digit represents whether backup is enabled from Monday to Sunday. A value of 0 indicates that backup is disabled, and a value of 1 indicates that backup is enabled:
|
1001000 |
| BackupPlanBegin |
string |
No |
The daily backup start time in UTC. |
03:00Z |
| BackupSetRetention |
integer |
No |
The retention period of backup sets. Unit: days. |
30 |
| BackupType |
string |
No |
The backup type. Currently, only "0" is supported, which indicates fast backup. |
0 |
| BackupWay |
string |
No |
The backup method. Valid values:
|
P |
| ForceCleanOnHighSpaceUsage |
integer |
No |
Specifies whether to forcibly clean up binary logs when the total space usage of the instance exceeds 80% or the remaining space is less than 50 GB. The cleanup starts from the earliest logs until the total space usage drops below 80% and the remaining space exceeds 50 GB. Valid values:
|
1 |
| IsEnabled |
integer |
No |
Specifies whether to enable backup. The value is fixed to 1, which indicates that backup is enabled. |
1 |
| LocalLogRetention |
integer |
No |
The number of hours that log backups are retained locally. Valid values: 0 to 168 (7 × 24 hours). A value of 0 indicates that log backups are not retained locally. Default value: 7. |
7 |
| RemoveLogRetention |
integer |
No |
The number of days that log backups are retained remotely. Valid values: 7 to 730. Unit: days. Default value: 7. |
7 |
| LogLocalRetentionSpace |
integer |
No |
The maximum binary log space usage in percentage. Valid values: 0 to 50. This parameter specifies a loop space. Default value: 30. |
30 |
| ColdDataBackupInterval |
integer |
No |
The interval of cold data backups. Unit: days. Valid values: 1 to 59. |
30 |
| ColdDataBackupRetention |
integer |
No |
The retention period of cold data backups. Unit: days. Valid values: 30 to 730. |
30 |
| LocalLogRetentionNumber |
integer |
No |
The number of local binary logs to retain. Default value: 60. Valid values: 6 to 100. |
60 |
| IsCrossRegionDataBackupEnabled |
boolean |
No |
Specifies whether to enable cross-region data backup. Default value: false. |
false |
| IsCrossRegionLogBackupEnabled |
boolean |
No |
Specifies whether to enable cross-region log backup. Default value: false. |
false |
| DestCrossRegion |
string |
No |
The destination region for cross-region backup. |
cn-shanghai |
| CrossRegionDataBackupRetention |
integer |
No |
The retention period of cross-region data backups. Unit: days. |
30 |
| CrossRegionLogBackupRetention |
integer |
No |
The retention period of cross-region log backups. Unit: days. |
30 |
| CrossRegionFilterValue |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The response message. "success" is returned if the request is successful. Otherwise, the corresponding error code is returned. |
success |
| RequestId |
string |
The request ID. |
FEA5DC20-6D8A-5979-97AA-FC57546ADC20 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Data |
object |
The backup policy details. |
|
| LogLocalRetentionSpace |
integer |
||
| DBInstanceName |
string |
||
| BackupWay |
string |
||
| BackupPeriod |
string |
||
| ForceCleanOnHighSpaceUsage |
integer |
||
| BackupType |
string |
||
| LocalLogRetention |
integer |
||
| RemoveLogRetention |
integer |
||
| BackupPlanBegin |
string |
||
| BackupSetRetention |
integer |
||
| IsEnabled |
integer |
||
| ColdDataBackupInterval |
integer |
||
| ColdDataBackupRetention |
integer |
||
| LocalLogRetentionNumber |
integer |
||
| IsCrossRegionDataBackupEnabled |
boolean |
||
| IsCrossRegionLogBackupEnabled |
boolean |
||
| DestCrossRegion |
string |
||
| CrossRegionDataBackupRetention |
integer |
||
| CrossRegionLogBackupRetention |
integer |
||
| CrossRegionFilterValue |
string |
Examples
Success response
JSON format
{
"Message": "success",
"RequestId": "FEA5DC20-6D8A-5979-97AA-FC57546ADC20",
"Success": true,
"Data": {
"LogLocalRetentionSpace": 0,
"DBInstanceName": "",
"BackupWay": "",
"BackupPeriod": "",
"ForceCleanOnHighSpaceUsage": 0,
"BackupType": "",
"LocalLogRetention": 0,
"RemoveLogRetention": 0,
"BackupPlanBegin": "",
"BackupSetRetention": 0,
"IsEnabled": 0,
"ColdDataBackupInterval": 0,
"ColdDataBackupRetention": 0,
"LocalLogRetentionNumber": 0,
"IsCrossRegionDataBackupEnabled": false,
"IsCrossRegionLogBackupEnabled": false,
"DestCrossRegion": "",
"CrossRegionDataBackupRetention": 0,
"CrossRegionLogBackupRetention": 0,
"CrossRegionFilterValue": ""
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.