ModifyBackupPolicy
Modifies the backup policy of a MongoDB instance.
Operation description
Cross-region backup is applicable only to replica set and sharded cluster instances that use cloud disks.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:ModifyBackupPolicy |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The instance ID. |
dds-bp16cb162771**** |
| PreferredBackupTime |
string |
No |
The time period during which backups are performed. The format is HH:mmZ-HH:mmZ (UTC). Note
The time period is limited to 1 hour. |
03:00Z-04:00Z |
| PreferredBackupPeriod |
string |
No |
The backup cycle. Valid values:
Important To ensure data security, back up your MongoDB data at least twice a week. Note
If you specify multiple values, separate them with commas (,). |
Monday,Wednesday,Friday,Sunday |
| BackupRetentionPeriod |
integer |
No |
The number of days for which full backups are retained. Note
|
30 |
| EnableBackupLog |
integer |
No |
Specifies whether to enable log backup. Valid values:
|
0 |
| LogBackupRetentionPeriod |
integer |
No |
The number of days for which log backups are retained. Default value: 7. Valid values: 7 to 730. |
7 |
| SnapshotBackupType |
string |
No |
The snapshot backup type. Valid values:
|
Standard |
| BackupInterval |
string |
No |
The high-frequency backup frequency. Valid values:
Note
|
-1 |
| HighFrequencyBackupRetention |
integer |
No |
The number of days for which high-frequency backups are retained. Before you use this parameter, make sure that the BackupInterval parameter is specified. Default value: 1. |
1 |
| BackupRetentionPolicyOnClusterDeletion |
integer |
No |
The backup data retention policy. Valid values:
For more information, see Long-term retention backups. |
2 |
| CrossBackupType |
string |
No |
The operation policy for cross-region backup. Valid values:
Note
This parameter is required for cross-region backup. |
update |
| SrcRegion |
string |
No |
The region where the instance is deployed. Note
|
cn-beijing |
| DestRegion |
string |
No |
The region where backups are stored. Note
This parameter is required for cross-region backup. |
cn-hangzhou |
| CrossRetentionType |
string |
No |
The retention type for cross-region backup. Valid values:
Note
This parameter is required for cross-region backup. |
delay |
| CrossRetentionValue |
integer |
No |
The retention period for cross-region backup. Valid values: 3 to 1825 days. Note
|
7 |
| CrossBackupPeriod |
string |
No |
The days of the week when cross-region backup is performed. Valid values:
Note
This parameter is required for cross-region backup.
|
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday |
| EnableCrossLogBackup |
integer |
No |
Specifies whether to enable cross-region log backup. Note
This parameter is required for cross-region backup.
|
1 |
| CrossLogRetentionType |
string |
No |
The retention type for cross-region log backup. Valid values:
Note
This parameter is required for cross-region backup. |
delay |
| CrossLogRetentionValue |
integer |
No |
The retention period for cross-region log backup. Valid values: 3 to 1825 days. The value must be less than or equal to the value of CrossRetentionValue. Note
This parameter is required for cross-region backup. |
3 |
| InstanceType |
string |
No |
The instance type. Valid values:
Note
|
replicate |
| PreserveOneEachHour |
boolean |
No |
Specifies whether to enable hourly sparse backup. Valid values:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
644A359C-B871-4DD3-97B5-ED91EF5809C2 |
Examples
Success response
JSON format
{
"RequestId": "644A359C-B871-4DD3-97B5-ED91EF5809C2"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidPreferredBackupPeriod.Malformed | Specified parameter PreferredBackupPeriod is not valid. | |
| 400 | InvalidPreferredBackupTime.Malformed | Specified parameter PreferredBackupTime is not valid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.