调用 CreateBackup 接口创建备份。
异步请求。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
InstanceId | String | 是 | mysql-e26822cf**** | 实例 ID。 |
BackupMethod | String | 否 | Physical | 备份类型,取值:
|
BackupType | String | 否 | Full | 备份方式。
|
BackupMeta | Object[] | 否 | 请参见请求示例。 | 创建逻辑备份类型的库表备份时,用于指定要备份的库表信息。
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
BackupId | String | 2c587b3e5b6e409ca38a2c99462a**** | 新创建的备份的 ID。 |
创建备份方式为全量备份的物理备份
POST /?Action=CreateBackup&Version=2022-01-01 HTTP/1.1 Accept: application/json Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "mysql-ce48081d****", "BackupType": "Full", "BackupMethod": "Physical" }
{ "ResponseMetadata": { "RequestId": "20230111114312146C48B77B8FB071C1FD", "Action": "CreateBackup", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-beijing" }, "Result": { "BackupId": "986533aae3ac4e27af6ec1cd2aeeca1d" } }
创建备份方式为全库备份的逻辑备份
POST /?Action=CreateBackup&Version=2022-01-01 HTTP/1.1 Accept: application/json Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "mysql-ce48081d****", "BackupMethod":"Logical", "BackupType":"DumpAll" }
{ "ResponseMetadata": { "RequestId": "20230111114312146C48B77B8FB071C1FD", "Action": "CreateBackup", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-beijing" }, "Result": { "BackupId": "2c587b3e5b6e409ca38a2c99462a****" } }
创建备份方式为库表备份的逻辑备份
POST /?Action=CreateBackup&Version=2022-01-01 HTTP/1.1 Accept: application/json Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "mysql-ce48081d****", "BackupMethod": "Logical", "BackupMeta": [ { "DBName": "testdb", "Tables": [ "" ] } ] }
{ "ResponseMetadata": { "RequestId": "20230111114312146C48B77B8FB071C1FD", "Action": "CreateBackup", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-beijing" }, "Result": { "BackupId": "e2a7f1ea55fb43b281b5fcaf3f5e****" } }
更多详情,请参见错误码。