You can call the SetBackupPolicy to set backup policy.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetBackupPolicy The parameter specified by the system. Value: SetBackupPolicy.
DrdsInstanceId String Yes drds************ The ID of the instance.
PreferredBackupPeriod String No 0 The backup cycle. Valid values:
  • 0: Monday
  • 1: Tuesday
  • 2: Wednesday
  • 3: Thursday
  • 4: Friday
  • 5: Saturday
  • 6: Sunday
PreferredBackupStartTime String No 11:30:30 The start time of the backup.
PreferredBackupEndTime String No 12:30:30 The end time of the backup.
BackupMode String No phy The backup mode. Valid values:
  • Logic : logical backup
  • phy: physical backup
BackupLevel String No db The level of the backup. Valid values:
  • db: The database type.
  • instance: instance
BackupDbNames String No test1,test2 The databases to be backed up. Separate multiple databases with commas (,).
Note This parameter takes effect only when the backup level is database level.
BackupLog String No 1 Specifies whether to enable log Backup. Valid values:
  • 1: enabled.
  • 0: disabled.
DataBackupRetentionPeriod String No 7 The retention period of the backup data. Value range: 7 to 730.
LogBackupRetentionPeriod String No 7 The log retention period. Valid values: 7 to 730. This value must be less than or equal to the number of data backup days.

Response parameters

Parameter Type Example Description
RequestId String A3140FC7-B78B-4D8E-B0C8-926D28****** The ID of the request.
Result String Success Indicates whether the backup policy was successfully configured.
Success Boolean true Indicates whether the database creation failure records were removed from the DRDS instance.


Sample requests

http(s):// Action=SetBackupPolicy
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.