All Products
Search
Document Center

ApsaraDB for MongoDB:ModifyBackupPolicy

更新時間:Sep 03, 2024

Modifies a backup policy for an ApsaraDB for MongoDB instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

dds-bp16cb162771****
PreferredBackupTimestringYes

The start time of the backup. Specify the time in the ISO 8601 standard in the HH:mmZ-HH:mmZ format. The time must be in UTC.

Note The time range is 1 hour.
03:00Z-04:00Z
PreferredBackupPeriodstringYes

The day of a week when the system regularly backs up data. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Note Separate multiple values with commas (,).
Monday,Wednesday,Friday,Sunday
BackupRetentionPeriodlongNo

The retention period of full backups.

Note
  • If your instance is created before September 10, 2021, backups are retained for seven days by default.

  • If your instance is created after September 10, 2021, backups are retained for 30 days by default.

30
EnableBackupLoglongNo

Specifies whether to enable the log backup feature. Valid values:

  • 0 (default): The log backup feature is disabled.
  • 1: The log backup feature is enabled.
0
LogBackupRetentionPeriodlongNo

The number of days for which log backups are retained. Default value: 7.

Valid values: 7 to 730.

7
SnapshotBackupTypestringNo

The snapshot backup type. Valid values:

  • Flash: single-digit second backup
  • Standard (default): standard backup
Standard
BackupIntervalstringNo

The frequency at which high-frequency backup is created. Valid values:

  • -1: High-frequency backup is disabled.
  • 30: High-frequency backups are generated every 30 minutes.
  • 60: High-frequency backups are generated every 1 hour.
  • 120: High-frequency backups are generated every 2 hours.
  • 180: High-frequency backups are generated every 3 hours.
  • 240: High-frequency backups are generated every 4 hours.
  • 360: High-frequency backups are generated every 6 hours.
  • 480: High-frequency backups are generated every 8 hours.
  • 720: High-frequency backups are generated every 12 hours.
Note
  • If the SnapshotBackupType parameter is set to Standard, this parameter is set to -1 and cannot be changed.

  • High-frequency backup takes effect only when the SnapshotBackupType parameter is set to Flash and the value of this parameter is greater than 0.

-1
HighFrequencyBackupRetentionlongNo

The number of days for which high-frequency backups are retained. Before you use this parameter, make sure that you specify the BackupInterval parameter. By default, high-frequency backups are retained for one day.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

644A359C-B871-4DD3-97B5-ED91EF5809C2

Examples

Sample success responses

JSONformat

{
  "RequestId": "644A359C-B871-4DD3-97B5-ED91EF5809C2"
}

Error codes

HTTP status codeError codeError message
400InvalidPreferredBackupPeriod.MalformedSpecified parameter PreferredBackupPeriod is not valid.
400InvalidPreferredBackupTime.MalformedSpecified parameter PreferredBackupTime is not valid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-22The Error code has changed. The request parameters of the API has changedView Change Details