You can call the DescribeCrossBackupMetaList operation to query the databases and tables whose data is included in a cross-region backup file of an ApsaraDB RDS instance.
ApsaraDB RDS for MySQL instances support cross-region backup and restoration. For more information, see Back up an ApsaraDB RDS for MySQL instance across regions and Restore the data of an ApsaraDB RDS for MySQL instance across regions.
Before you call this operation, make sure that the instance runs one of the following database engines:
- MySQL. For more information, see Back up an ApsaraDB RDS for MySQL instance across regions.
- SQL Server. For more information, see Back up an ApsaraDB RDS for SQL Server instance across regions.
- PostgreSQL. For more information, see Back up an ApsaraDB RDS for PostgreSQL instance across regions.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeCrossBackupMetaList |
The operation that you want to perform. Set the value to DescribeCrossBackupMetaList. |
BackupSetId | String | Yes | 123456 |
The ID of the cross-region backup file that you want to use. You can call the DescribeCrossRegionBackups operation to query the ID of the cross-region backup file. |
GetDbName | String | No | testdb1 |
The name of the database to query. The system implements exact match based on the value of this parameter and returns the name of the matched database and the names of the tables in the matched database. |
Pattern | String | No | test |
The name of the database to query. The system implements fuzzy match based on the value of this parameter and returns only the name of the matched database. Note You can implement fuzzy match and then exact match. For example, you can set the Pattern
parameter to test to query the testdb1 and testdb2 databases. Then, you can specify
the GetDbName parameter to query only the matched database and the tables in the matched database.
|
PageSize | String | No | 30 |
The number of entries to return on each page. Default value: 1. Note This parameter is valid only when you specify the PageIndex parameter.
|
PageIndex | String | No | 1 |
The number of the page to return. Valid values: any non-zero positive integer. Note This parameter is valid only when you specify the PageSize parameter.
|
Region | String | No | cn-hangzhou |
The region ID of the instance. |
ResourceGroupId | String | No | rg-acfmy***** |
The ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DBInstanceName | String | rm-uf6wjk5xxxxxxx |
The instance to which the cross-region backup file belongs. |
TotalPageCount | Integer | 1 |
The total number of returned pages. |
RequestId | String | 60F9A12A-16B8-4728-B099-4CA38D32C31C |
The ID of the request. |
PageRecordCount | Integer | 1 |
The number of entries returned on the current page. |
TotalRecordCount | Integer | 1 |
The total number of entries returned. |
PageNumber | Integer | 1 |
The page number of the returned page. |
Items | Array of Meta |
An array that consists of the information about the databases and tables whose data is included in the cross-region backup file. |
|
Meta | |||
Tables | String | test1,test2 |
An array that consists of the names of the tables that the database contains. If the database contains more than one table, the names of these tables are separated by commas (,). |
Database | String | testdb1 |
The name of the database. |
Size | String | 1000 |
The size of the table. Unit: KB. If the database contains more than one table, the names of these tables are separated by commas (,). |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=DescribeCrossBackupMetaList
&BackupSetId=123456
&GetDbName=testdb1
&PageSize=30
&PageIndex=1
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeCrossBackupMetaListResponse>
<TotalRecordCount>1</TotalRecordCount>
<TotalPageCount>1</TotalPageCount>
<RequestId>60F9A12A-16B8-4728-B099-4CA38D32C31C</RequestId>
<PageNumber>1</PageNumber>
<Items>
<Meta>
<Size>4320</Size>
<Size>5</Size>
<Database>testdb1</Database>
<Tables>test1</Tables>
<Tables>test2</Tables>
</Meta>
</Items>
<DBInstanceName>rm-uf6wjk5xxxxxxx</DBInstanceName>
</DescribeCrossBackupMetaListResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalRecordCount" : 1,
"TotalPageCount" : 1,
"RequestId" : "60F9A12A-16B8-4728-B099-4CA38D32C31C",
"PageNumber" : 1,
"Items" : {
"Meta" : [ {
"Size" : [ 4320, 5 ],
"Database" : "testdb1",
"Tables" : [ "test1", "test2" ]
} ]
},
"DBInstanceName" : "rm-uf6wjk5xxxxxxx"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidPageSize | The page size is invalid | The error message returned because the value of the PageSize parameter is invalid. You must specify a valid value for the PageSize parameter. |
400 | InvalidRestoreTime.Format | Specified restore time is not valid. | The error message returned because the value of the RestoreTime parameter is invalid. You must specify a valid value for the RestoreTime parameter. |
403 | InvalidMeta.Empty | Meta information is empty. | The error message returned because the value of the Meta parameter is empty. |
403 | IncorrectDBInstanceType | Current DB instance type does not support this operation. | The error message returned because this operation is not supported when the instance is in the current state. |
403 | IncorrectEngineVersion | Current engine version does not support operations. | The error message returned because this operation is not supported for the database engine version that is run on the instance. |
403 | InvalidBackupLogStatus | Current backup log enable status does not support this operation. | The error message returned because the log backup feature is disabled and consequently data cannot be restored to a specific point in time. |
404 | InvalidBackupSetID.NotFound | Specified backup set ID does not exist. | The error message returned because the specified data backup file does not exist. You must specify a valid data backup file. |
404 | Request.NotFound | The requested resource is not available. | The error message returned because the resource you requested is unavailable. |
For a list of error codes, visit the API Error Center.