Domain name for API request: cdb.intl.tencentcloudapi.com.
This API is used to modify database backup configuration.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ModifyBackupConfig. |
| Version | Yes | String | Common Params. The value used for this API: 2017-03-20. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Instance ID, in the format such as cdb-c1nl9rpv. This matches the instance ID displayed on the TencentDB console. |
| ExpireDays | No | Integer | Retention time of the data backup file, in days. 1. MySQL two-node, three-node, and cloud disk edition data backup files can be retained for 7-1830 days. 2. MySQL single-node (cloud disk) data backup files can be retained for 7-30 days. |
| StartTime | No | String | (This parameter will be disused. The BackupTimeWindow parameter is recommended.) Backup time range in the format of 02:00-06:00, with the start time and end time on the hour. Valid values: 00:00-12:00, 02:00-06:00, 06:00-10:00, 10:00-14:00, 14:00-18:00, 18:00-22:00, 22:00-02:00. |
| BackupMethod | No | String | Automatic backup mode. Only physical (physical cold backup) is supported |
| BinlogExpireDays | No | Integer | binlog retention time in days. 1. MySQL two-node, three-node, and cloud disk log backup files can be retained for 7 to 3650 days. 2. MySQL single-node (cloud disk) log backup files can be retained for 7-30 days. |
| BackupTimeWindow | No | CommonTimeWindow | Backup time window; for example, to set up backup between 10:00 and 14:00 on every Tuesday and Sunday, you should set this parameter as follows: {"Monday": "", "Tuesday": "10:00-14:00", "Wednesday": "", "Thursday": "", "Friday": "", "Saturday": "", "Sunday": "10:00-14:00"} (Note: You can set up backup on different days, but the backup time windows need to be the same. If this field is set, the StartTime field will be ignored) |
| EnableBackupPeriodSave | No | String | Periodic backup retention switch. off - periodic backup retention policy is not enabled, on - periodic backup retention policy is enabled. Default is off. |
| EnableBackupPeriodLongTermSave | No | String | Switch for long-term backup retention (This field can be ignored, for its feature hasn’t been launched). Valid values: off (disable), on (enable). Default value: off. Once enabled, the parameters (BackupPeriodSaveDays, BackupPeriodSaveInterval, and BackupPeriodSaveCount) will be invalid. |
| BackupPeriodSaveDays | No | Integer | Maximum days of archive backup retention. Valid range: 90-3650. Default value: 1080. |
| BackupPeriodSaveInterval | No | String | Archive backup retention period. Valid values: weekly (a week), monthly (a month), quarterly (a quarter), yearly (a year). Default value: monthly. |
| BackupPeriodSaveCount | No | Integer | Number of archive backups. Minimum value: 1, Maximum value: Number of non-archive backups in archive backup retention period. Default value: 1. |
| StartBackupPeriodSaveDate | No | String | The start time in the format of yyyy-mm-dd HH:MM:SS, which is used to enable archive backup retention policy. |
| EnableBackupArchive | No | String | Whether the data backup/archive policy is enabled. off - disabled, on - enabled. If not specified, remain unchanged. |
| BackupArchiveDays | No | Integer | The period (in days) of how long a data backup is retained before being archived, which falls between 180 days and the number of days from the time it is created until it expires. |
| BinlogArchiveDays | No | Integer | The period (in days) of how long a log backup is retained before being archived, which falls between 180 days and the number of days from the time it is created until it expires. |
| EnableBinlogArchive | No | String | Whether to enable log backup archive strategy. off - off, on - on. If not specified, remain unchanged. |
| EnableBackupStandby | No | String | Whether to enable the standard storage policy for data backup. off - disabled, on - enabled. If not specified, it remains unchanged. |
| BackupStandbyDays | No | Integer | The period (in days) of how long a data backup is retained before switching to standard storage, which falls between 30 days and the number of days from the time it is created until it expires. If the archive backup is enabled, this period cannot be greater than archive backup period. |
| EnableBinlogStandby | No | String | Whether to enable log backup standard storage policy. off - off, on - on. If not specified, remain unchanged. |
| BinlogStandbyDays | No | Integer | The period (in days) of how long a log backup is retained before switching to standard storage, which falls between 30 days and the number of days from the time it is created until it expires. If the archive backup is enabled, this period cannot be greater than archive backup period. |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Modify database backup configuration
POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyBackupConfig
<Common request parameters>
{
"InstanceId": "cdb-c1nl9rpv",
"ExpireDays": 10,
"BinlogExpireDays": 8,
"BackupMethod": "physical",
"StartTime": "02:00-06:00"
}
{
"Response": {
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| CdbError | Backend or process error. |
| FailedOperation.StatusConflict | Task status conflict. |
| InternalError.DatabaseAccessError | Internal database error. |
| InternalError.UndefinedError | Unknown error |
| InvalidParameter | Parameter error. |
| InvalidParameter.InstanceNotFound | The instance does not exist. |
| OperationDenied.ActionNotSupport | Unsupported operation. |
| OperationDenied.UserHasNoStrategy | This account is not authorized to access the requested resource. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários