You can call the DescribeCrossRegionBackups operation to query the cross-region data backup files of an ApsaraDB for RDS instance.

For more information about how to query the cross-region log backup files of an RDS instance, see DescribeCrossRegionLogBackupFiles.

Before you call this operation, make sure that the instance runs one of the following database engine versions and RDS editions:

  • MySQL 8.0 on RDS High-availability Edition (with local SSDs)
  • MySQL 5.7 on RDS High-availability Edition (with local SSDs)
  • MySQL 5.6

Debugging

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 DescribeCrossRegionBackups

The operation that you want to perform. Set the value to DescribeCrossRegionBackups.

DBInstanceId String Yes rm-uf6wjk5xxxxxxxxxx

The ID of the instance.

RegionId String Yes cn-hangzhou

The ID of the region to which the instance belongs.

CrossBackupRegion String No cn-shanghai

The ID of the destination region where the cross-region data backup files of the instance are stored.

CrossBackupId Integer No 14562

The ID of the cross-region data backup file that you want to query.

Note You must specify the CrossBackupId parameter. Alternatively, you must specify the StartTime and EndTime parameters.
StartTime String No 2019-05-30T12:10:00Z

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EndTime String No 2019-06-15T12:10:00Z

The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

PageSize Integer No 30

The number of entries to return on each page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

PageNumber Integer No 1

The number of the page to return. Pages start from page 1.

Default value: 1.

Response parameters

Parameter Type Example Description
RegionId String cn-hangzhou

The ID of the region to which the instance belongs.

StartTime String 2019-05-30T12:10:00Z

The start of the time range queried.

EndTime String 2019-06-15T12:10:00Z

The end of the time range queried.

TotalRecordCount Integer 100

The total number of entries returned.

PageNumber Integer 1

The page number of the returned page. Pages start from page 1.

Default value: 1.

PageRecordCount Integer 30

The number of cross-region data backup files on the current page.

RequestId String 60912B41-7579-4B5D-B289-8856030F0A6A

The ID of the request.

Items Array of Item

An array that consists of cross-region data backup files.

Item
BackupEndTime String 2019-06-15T12:10:00Z

The end time of the cross-region data backup file.

BackupMethod String P

The method that is used to generate the cross-region data backup file. Valid values:

  • L: logical backup
  • P: physical backup
BackupSetScale Integer 0

The level at which the cross-region data backup file is generated.

  • 0: instance-level backup
  • 1: database-level backup
BackupSetStatus Integer 0

The status of the cross-region data backup. Valid values:

  • 0: The cross-region data backup is successful.
  • 1: The cross-region data backup failed.
BackupStartTime String 2019-05-30T12:10:00Z

The time when the cross-region data backup started.

BackupType String F

The type of the cross-region data backup. Valid values:

  • F: full data backup
  • I: incremental data backup
Category String HighAvailability

The RDS edition of the instance. Valid values:

  • Basic: Basic Edition
  • HighAvailability: High-availability Edition
  • Finance: Enterprise Edition
ConsistentTime String 2019-06-12T05:44:46Z

The point in time that is indicated by the data in the cross-region data backup file.

CrossBackupDownloadLink String http://rdsddrbak-shanghai.oss-cn-shanghai.aliyuncs.com/xxxxx

The external URL from which you can download the cross-region data backup file.

CrossBackupId Integer 14377

The ID of the cross-region data backup file.

CrossBackupRegion String cn-shanghai

The ID of the destination region where the cross-region data backup file is stored.

CrossBackupSetFile String cn-hangzhou_rm-xxxxx_hins81xxx_data_20190612134426_qp.xb

The name of the compressed package that contains the cross-region data backup file.

CrossBackupSetLocation String oss

The location where the cross-region data backup file is stored.

CrossBackupSetSize Long 5312836

The size of the cross-region data backup file. Unit: bytes.

DBInstanceStorageType String ssd

The type of storage media that is used by the instance. Valid values:

  • local_ssd: local SSD. This is the recommended storage type.
  • cloud_ssd: standard SSD.
  • cloud_essd: enhanced SSD.
Engine String mysql

The database engine that the instance runs.

EngineVersion String 5.6

The database engine version that the instance runs.

InstanceId Integer 8161055

The ID of the instance. This parameter is used to determine whether the instance that generates the cross-region data backup file is a primary or secondary instance.

RestoreRegions List "cn-hangzhou", "cn-shanghai"

An array that consists of the regions to which the cross-region data backup file can be restored.

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=DescribeCrossRegionBackups
&DBInstanceId=rm-uf6wjk5xxxxxxxxxx
&RegionId=cn-hangzhou
&CrossBackupId=14562
&<Common request parameters>

Sample success responses

XML format

<DescribeCrossRegionBackupsResponse>
  <Items>
            <Item>
                  <CrossBackupSetFile>cn-hangzhou_rm-bpxxxxx_hins798xxxx_data_20190611125201.tar.gz</CrossBackupSetFile>
                  <BackupSetScale>0</BackupSetScale>
                  <BackupType>F</BackupType>
                  <InstanceId>7980000</InstanceId>
                  <CrossBackupId>14358</CrossBackupId>
                  <BackupEndTime>2019-06-11T04:55:02Z</BackupEndTime>
                  <BackupMethod>P</BackupMethod>
                  <CrossBackupSetLocation>oss</CrossBackupSetLocation>
                  <CrossBackupSetSize>2179643</CrossBackupSetSize>
                  <Engine>mysql</Engine>
                  <BackupStartTime>2019-06-11T04:52:46Z</BackupStartTime>
                  <CrossBackupDownloadLink>http://rdsddrbak-zb.oss-cn-zhangjiakou.aliyuncs.com/cn-hangzhou_rm-bpxxxxx_hins7986073_data_20190611125201.tar.gz?OSSAccessKeyId=LTAxxxxx&amp;Expires=1560501641&amp;Signature=laK0kxxxxx%3D</CrossBackupDownloadLink>
                  <Category>HighAvailability</Category>
                  <CrossBackupRegion>cn-zhangjiakou</CrossBackupRegion>
                  <RestoreRegions>
                        <RestoreRegion>cn-hangzhou</RestoreRegion>
                        <RestoreRegion>cn-zhangjiakou</RestoreRegion>
                  </RestoreRegions>
                  <EngineVersion>5.7</EngineVersion>
                  <DBInstanceStorageType>ssd</DBInstanceStorageType>
            </Item>
      </Items>
      <TotalRecordCount>1</TotalRecordCount>
      <PageNumber>1</PageNumber>
      <RequestId>60912B41-7579-4B5D-B289-8856030F0A6A</RequestId>
      <RegionId>cn-hangzhou</RegionId>
      <EndTime>2019-06-11T08:00:00Z</EndTime>
      <StartTime>2019-06-10T00:00:00Z</StartTime>
      <PageRecordCount>30</PageRecordCount>
    </DescribeCrossRegionBackupsResponse>

JSON format

{
    "Items": {
        "Item": [
            {
                "CrossBackupSetFile": "cn-hangzhou_rm-bpxxxxx_hins798xxxx_data_20190611125201.tar.gz",
                "BackupSetScale": 0,
                "BackupType": "F",
                "InstanceId": 7980000,
                "CrossBackupId": 14358,
                "BackupEndTime": "2019-06-11T04:55:02Z",
                "BackupMethod": "P",
                "CrossBackupSetLocation": "oss",
                "CrossBackupSetSize": 2179643,
                "Engine": "mysql",
                "BackupStartTime": "2019-06-11T04:52:46Z",
                "CrossBackupDownloadLink": "http://rdsddrbak-zb.oss-cn-zhangjiakou.aliyuncs.com/cn-hangzhou_rm-bpxxxxx_hins7986073_data_20190611125201.tar.gz?OSSAccessKeyId=LTAxxxxx&Expires=1560501641&Signature=laK0kxxxxx%3D",
                "Category": "HighAvailability",
                "CrossBackupRegion": "cn-zhangjiakou",
                "RestoreRegions": {
                    "RestoreRegion": [
                        "cn-hangzhou",
                        "cn-zhangjiakou"
                    ]
                },
                "EngineVersion": "5.7",
                "DBInstanceStorageType": "ssd"
            }
        ]
    },
    "TotalRecordCount": 1,
    "PageNumber": 1,
    "RequestId": "60912B41-7579-4B5D-B289-8856030F0A6A",
    "RegionId": "cn-hangzhou",
    "EndTime": "2019-06-11T08:00:00Z",
    "StartTime": "2019-06-10T00:00:00Z",
    "PageRecordCount": 30
}

Error codes

HPPT status code Error code Error message Description
400 InvalidStartTime.Format Specified start time is not valid. The error message returned because the specified start time is invalid.
400 InvalidEndTime.Format Specified end time is not valid. The error message returned because the specified end time is invalid.

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