Modifies the backup policy of a MongoDB instance.
Operation description
Geo-redundancy is available only for replica set instances 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 range to perform a backup. Specify the time in the HH:mmZ-HH:mmZ format. The time is displayed in Coordinated Universal Time (UTC). Note
The time range must be 1 hour. |
03:00Z-04:00Z |
| PreferredBackupPeriod |
string |
No |
The backup cycle. Valid values:
Important
To ensure data security, back up the MongoDB instance at least twice a week. Note
To specify multiple backup cycles, separate them with commas (,). |
Monday,Wednesday,Friday,Sunday |
| BackupRetentionPeriod |
integer |
No |
The number of days to retain full backups. Note
|
30 |
| EnableBackupLog |
integer |
No |
Specifies whether to enable log backup. Valid values:
Important
You cannot disable log backup for sharded cluster instances. |
0 |
| LogBackupRetentionPeriod |
integer |
No |
The number of days to retain log backups. Default value: 7. Valid values: 7 to 730. |
7 |
| SnapshotBackupType |
string |
No |
The snapshot backup type. Valid values:
|
Standard |
| BackupInterval |
string |
No |
The frequency of high-frequency backups. Valid values:
Note
|
-1 |
| HighFrequencyBackupRetention |
integer |
No |
The number of days to retain high-frequency backups. Before you specify this parameter, you must set the BackupInterval parameter. The default retention period is 1 day. |
1 |
| BackupRetentionPolicyOnClusterDeletion |
integer |
No |
The policy to retain backups when you release the instance.
For more information, see Long-term backup retention. |
2 |
| CrossBackupType |
string |
No |
The policy for geo-redundant backups. Valid values:
Note
This parameter is required if you enable geo-redundancy. |
update |
| SrcRegion |
string |
No |
The region ID of the instance. Note
|
cn-beijing |
| DestRegion |
string |
No |
The region ID of the geo-redundant backup. Note
This parameter is required if you enable geo-redundancy. |
cn-hangzhou |
| CrossRetentionType |
string |
No |
The retention policy for geo-redundant backups. Valid values:
Note
This parameter is required if you enable geo-redundancy. |
delay |
| CrossRetentionValue |
integer |
No |
The number of days to retain geo-redundant backups. Valid values: 3 to 1825. Note
|
7 |
| CrossBackupPeriod |
string |
No |
The days of the week to perform geo-redundant backups. Valid values:
Note
This parameter is required if you enable geo-redundancy.
|
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday |
| EnableCrossLogBackup |
integer |
No |
Specifies whether to enable cross-region log backup. Valid values: Note
This parameter is required if you enable geo-redundancy.
|
1 |
| CrossLogRetentionType |
string |
No |
The retention policy for cross-region log backups. Valid values:
Note
This parameter is required if you enable geo-redundancy. |
delay |
| CrossLogRetentionValue |
integer |
No |
The number of days to retain cross-region log backups. Valid values: 3 to 1825. The value must be less than or equal to the value of CrossRetentionValue. Note
This parameter is required if you enable geo-redundancy. |
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
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
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.