Modifies the backup policy of a PolarDB instance.
Operation description
Applicable engine
PolarDB for MySQL
This operation is currently available only to specific customers. To use this operation, submit a request in the DBS customer consultation group (DingTalk group ID: 35585947).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dbs:ModifyBackupPolicy |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionCode |
string |
No |
The region where the backup set resides. |
cn-shanghai |
| PreferredBackupWindowBegin |
string |
No |
The start time of the basic backup window. |
17:00Z |
| InstanceName |
string |
No |
The PolarDB instance ID. |
pc-2ze3nrr64c5**** |
| Category |
string |
No |
The backup type. Valid values:
|
Flash |
| AdvanceLogPolicies |
array<object> |
No |
The destination region of the backup policy. |
|
|
object |
No |
The source region of the backup policy. |
||
| LogRetentionType |
string |
No |
The retention period type. Valid values:
|
Never |
| DestType |
string |
No |
The destination type of the backup policy. Valid values:
|
level1 |
| FilterType |
string |
No |
The advanced policy filter type. Valid values:
|
crontab |
| ActionType |
string |
No |
The operation type. Valid values: CREATE, UPDATE, and DELETE. |
CREATE |
| SrcRegion |
string |
No |
The source region of the backup policy. |
cn-hangzhou |
| EnableLogBackup |
integer |
No |
Specifies whether log backup is enabled. Valid values:
|
1 |
| SrcType |
string |
No |
The source type of the backup policy. Valid values:
|
db |
| LogRetentionValue |
string |
No |
The number of days before expiration. |
30 |
| PolicyId |
string |
No |
The advanced policy ID. |
31289676-bb8d-4dee-b83e-****** |
| FilterKey |
string |
No |
The scheduling type. This parameter is valid only when FilterType is set to crontab. Valid values:
|
dayOfMonth |
| DestRegion |
string |
No |
The destination region of the backup policy. |
cn-hangzhou |
| FilterValue |
string |
No |
The specific filter value. |
1 |
| AdvanceDataPolicies |
array<object> |
No |
The details of the data backup policy. |
|
|
object |
No |
The policy details. |
||
| DestType |
string |
No |
The destination type of the backup policy. Valid values:
|
level1 |
| FilterType |
string |
No |
The advanced policy filter type. Valid values:
|
crontab |
| ActionType |
string |
No |
The operation type. Valid values:
|
UPDATE |
| SrcRegion |
string |
No |
The source region of the backup policy. |
cn-shanghai |
| SrcType |
string |
No |
The source type of the backup policy. Valid values:
|
db |
| OnlyPreserveOneEachDay |
boolean |
No |
Specifies whether to retain only one high-frequency backup set per day for backups older than one day. |
true |
| RetentionValue |
string |
No |
The number of days before expiration. |
4 |
| PolicyId |
string |
No |
The advanced policy ID. You can call DescribeBackupPolicy to query this value. |
6s67c7i3y8f8p72808p****** |
| FilterKey |
string |
No |
The scheduling type. Valid values:
Note
This parameter is returned only when FilterType is set to crontab. |
backupInterval |
| DestRegion |
string |
No |
The destination region of the backup policy. |
cn-shanghai |
| FilterValue |
string |
No |
The backup cycle. |
180 |
| RetentionType |
string |
No |
The retention period type of the backup set. Valid values:
|
delay |
| StorageClass |
string |
No |
The storage class of the bucket. Valid values:
|
Standard |
| AdvanceIncPolicies |
array<object> |
No |
The destination region of the backup policy. |
|
|
object |
No |
The source region of the backup policy. |
||
| DestType |
string |
No |
The destination type of the backup policy. Valid values:
|
level1 |
| FilterType |
string |
No |
The advanced policy filter type. Valid values:
|
crontab |
| ActionType |
string |
No |
The operation type. Valid values: CREATE, UPDATE, and DELETE. |
CREATE |
| SrcRegion |
string |
No |
The source region of the backup policy. |
cn-hangzhou |
| SrcType |
string |
No |
The source type of the backup policy. Valid values:
|
db |
| OnlyPreserveOneEachDay |
boolean |
No |
Specifies whether to retain only one high-frequency backup set per day for backups older than one day. |
true |
| RetentionValue |
string |
No |
The number of days before expiration. |
365 |
| PolicyId |
string |
No |
The advanced policy ID. |
1 |
| FilterKey |
string |
No |
The scheduling type. This parameter is valid only when FilterType is set to crontab. Valid values:
|
dayOfMonth |
| DestRegion |
string |
No |
The destination region of the backup policy. |
cn-hangzhou |
| FilterValue |
string |
No |
The specific filter value. |
1 |
| RetentionType |
string |
No |
The retention period type. Valid values:
|
delay |
| BackupRetentionPolicyOnClusterDeletion |
string |
No |
The archive backup data retention policy for deleted instances. Valid values:
|
0 |
| BackupMethod |
string |
No |
The backup method. Valid values:
|
logical |
| BackupPriority |
integer |
No |
The backup policy for the secondary instance. Valid values:
Note
This parameter applies only to ApsaraDB RDS for SQL Server instances. For other engines, the value 0 is returned. |
2 |
| EnableIncBackup |
boolean |
No |
Specifies whether to enable incremental backup. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
D570F209-A166-50C6-98A3-155A20B218B7 |
| Message |
string |
The returned message. |
instanceName can not be empty. |
| Data |
object |
The backup policy details. |
|
| PreferredBackupWindowBegin |
string |
The start time of the basic backup window. |
17:00Z |
| PreferredBackupWindow |
string |
The basic backup window. |
17:00Z-18:00Z |
| Category |
string |
Indicates whether backup within seconds is enabled. Valid values:
Note
This parameter applies only to MySQL. |
Standard |
| AdvanceLogPolicies |
array<object> |
The policy details. |
|
|
object |
The policy details. |
||
| LogRetentionType |
string |
The retention type for log backups. Valid values: |
delay |
| DestType |
string |
The destination type of the backup policy. Valid values: |
level1 |
| FilterType |
string |
The filter type for the advanced policy. Valid values:
|
crontab |
| SrcRegion |
string |
The source region of the backup policy. |
cn-beijing |
| EnableLogBackup |
integer |
This parameter is reserved. |
1 |
| SrcType |
string |
The source type of the backup policy. Valid values: |
level1 |
| PolicyId |
string |
The ID of the backup policy. |
dc13b153acc91141789122c23835**** |
| DestRegion |
string |
The destination region of the backup policy. |
cn-shanghai |
| LogRetentionValue |
string |
The retention period for log backups, in days. |
3 |
| FilterKey |
string |
The scheduling type. This parameter applies only when |
dayOfMonth |
| FilterValue |
string |
The value of the filter. |
1 |
| AdvanceDataPolicies |
array<object> |
The details of the data backup policy. |
|
|
object |
The policy details. |
||
| RetentionValue |
string |
The retention period in days. |
4 |
| BakType |
string |
The backup type. Valid values:
|
F |
| FilterKey |
string |
The scheduling type. Valid values:
Note
This parameter is returned only if |
backupInterval |
| FilterValue |
string |
The value of the filter. |
180 |
| DestType |
string |
The destination type of the backup policy. Valid values:
|
level1 |
| FilterType |
string |
The filter type for the advanced policy. Valid values:
|
crontab |
| SrcRegion |
string |
The source region of the backup policy. |
cn-shanghai |
| AutoCreated |
boolean |
Specifies whether the policy is automatically generated by the system. Valid values:
|
false |
| SrcType |
string |
The source type of the backup policy. Valid values:
|
db |
| OnlyPreserveOneEachDay |
boolean |
Specifies whether to retain only one backup set per day. Valid values:
|
true |
| DumpAction |
string |
The dump operation. Valid values:
|
copy |
| PolicyId |
string |
The ID of the advanced policy. |
dc13b153acc91141789122c23835**** |
| DestRegion |
string |
The destination region of the backup policy. |
cn-shanghai |
| RetentionType |
string |
The retention period type for the backup set. Valid values:
|
delay |
| StorageClass |
string |
The storage class. |
ARCHIVE |
| AdvanceIncPolicies |
array<object> |
The retention period type. Valid values:
|
|
|
object |
The destination type of the backup policy. Valid values:
|
||
| RetentionValue |
string |
The retention period in days. |
365 |
| BakType |
string |
The backup type. Valid values: |
F |
| FilterKey |
string |
The scheduling type. This parameter applies only when |
dayOfMonth |
| FilterValue |
string |
The value of the filter. |
1 |
| DestType |
string |
The destination type of the backup policy. Valid values: |
level1 |
| FilterType |
string |
The filter type for the advanced policy. Valid values: |
Crontab |
| SrcRegion |
string |
The source region of the backup policy. |
cn-hangzhou |
| AutoCreated |
boolean |
Indicates whether the policy is automatically generated by the system. Valid values: |
true |
| SrcType |
string |
The source type of the backup policy. Valid values: |
db |
| OnlyPreserveOneEachDay |
boolean |
Specifies whether to retain only one backup set per day. Valid values:
|
true |
| DumpAction |
string |
The dump operation. Valid values: |
Copy |
| PolicyId |
string |
The ID of the advanced policy. |
smp-8sv763r9boydzb*** |
| DestRegion |
string |
The destination region of the backup policy. |
cn-hangzhou |
| RetentionType |
string |
The retention period type for the backup set. Valid values: |
Delay |
| BackupRetentionPolicyOnClusterDeletion |
string |
The archive backup data retention policy for deleted instances. Valid values:
|
LATEST |
| BackupMethod |
string |
The backup method. Valid values:
|
Physical |
| BackupPriority |
integer |
The backup policy for the secondary instance. Valid values:
Note
This parameter applies only to ApsaraDB RDS for SQL Server instances. For other engines, the value 0 is returned. |
1 |
| EnableIncBackup |
boolean |
Specifies whether to enable incremental backup. |
true |
| ErrMessage |
string |
The error message. |
The specified parameter %s value is not valid. |
| Code |
string |
The status code. |
Success |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
| ErrCode |
string |
The error code. |
Success |
Examples
Success response
JSON format
{
"RequestId": "D570F209-A166-50C6-98A3-155A20B218B7",
"Message": "instanceName can not be empty.",
"Data": {
"PreferredBackupWindowBegin": "17:00Z",
"PreferredBackupWindow": "17:00Z-18:00Z",
"Category": "Standard",
"AdvanceLogPolicies": [
{
"LogRetentionType": "delay",
"DestType": "level1",
"FilterType": "crontab",
"SrcRegion": "cn-beijing",
"EnableLogBackup": 1,
"SrcType": "level1",
"PolicyId": "dc13b153acc91141789122c23835****",
"DestRegion": "cn-shanghai",
"LogRetentionValue": "3",
"FilterKey": "dayOfMonth",
"FilterValue": "1"
}
],
"AdvanceDataPolicies": [
{
"RetentionValue": "4",
"BakType": "F",
"FilterKey": "backupInterval",
"FilterValue": "180",
"DestType": "level1",
"FilterType": "crontab",
"SrcRegion": "cn-shanghai",
"AutoCreated": false,
"SrcType": "db",
"OnlyPreserveOneEachDay": true,
"DumpAction": "copy",
"PolicyId": "dc13b153acc91141789122c23835****",
"DestRegion": "cn-shanghai",
"RetentionType": "delay",
"StorageClass": "ARCHIVE"
}
],
"AdvanceIncPolicies": [
{
"RetentionValue": "365",
"BakType": "F",
"FilterKey": "dayOfMonth",
"FilterValue": "1",
"DestType": "level1",
"FilterType": "Crontab",
"SrcRegion": "cn-hangzhou",
"AutoCreated": true,
"SrcType": "db",
"OnlyPreserveOneEachDay": true,
"DumpAction": "Copy",
"PolicyId": "smp-8sv763r9boydzb***",
"DestRegion": "cn-hangzhou",
"RetentionType": "Delay"
}
],
"BackupRetentionPolicyOnClusterDeletion": "LATEST",
"BackupMethod": "Physical",
"BackupPriority": 1,
"EnableIncBackup": true
},
"ErrMessage": "The specified parameter %s value is not valid.",
"Code": "Success",
"Success": "true",
"ErrCode": "Success"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Request.Forbidden | Have no Permissions |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.