You can call DescribeBackups to query the backup files of an ApsaraDB for Redis instance.

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 No DescribeBackups

The operation that you want to perform. Set this parameter to DescribeBackups.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance.

StartTime String Yes 2019-03-11T10:00Z

The beginning of the UTC time range where backup files are queried. Example: 2018-12-21T18:10Z.

End time String Yes 2019-03-14T18:00Z

The end of the UTC time range where backup files are queried. Example: 2018-12-28T18:10Z.

BackupId Integer No 111111111

The ID of the backup file.

PageNumber Integer No 1

The number of the page to return. It must be greater than 0 and cannot exceed the maximum value of the Integer type.

PageSize Integer No 30

The maximum number of backup files that were returned on each page.

NeedAof String No 1

Whether to enable or disable the AoF archiving funtion. Valid values:

  • 0: disable.
  • 1: enable.
Note Default value: 0
RegionId String No cn-hangzhou

The ID of the region where the instance resides.

Response parameters

Parameter Type Example Description
RequestId String 963C20F0-7CE1-4591-AAF3-6F3CD1CEB2F5

The ID of the request.

PageNumber Integer 1

The number of the page returned.

PageSize Integer 30

The maximum number of backup files that were returned on each page.

TotalCount Integer 5

The total number of backup files that were returned.

Backups Array

The detailed information of backup files.

BackupId Integer 111111111

The ID of the backup file.

BackupDBNames String all

The database that was backed up.

BackupStatus String success

Indicates whether the backup was successful or not. Valid values:

  • Success
  • Failed
BackupStartTime String 2019-03-14T05:28:50Z

The time when the backup started.

BackupEndTime String 2019-03-14T05:31:13Z

The time when the backup ended.

BackupType String FullBackup

The type of the backup file. Valid values:

  • FullBackup
  • IncrementalBackup
BackupMode String Automated

The mode in which data was backed up. Valid values:

  • Automated
  • Manual
BackupMethod String Physical

The method in which data was backed up. Valid values:

  • Logical
  • Physical
BackupDownloadURL String https://rdsbak-hk45-v2.oss-cn-hongkong.aliyuncs.com/xxxxxxxxxxx

The public network link for downloading the backup file.

BackupSize Long 1024

The size of the backup file.

EngineVersion String 4.0

The engine version, that is, the major version of the instance.

NodeInstanceId String r-bp1xxxxxxxxxxxxx

The ID of the node.

BackupIntranetDownloadURL String https://rdsbak-hk45-v2.oss-cn-hongkong.aliyuncs.com/xxxxxxxxxxx

The private network link for downloading the backup file.

Note You can download the target backup file by using this URL in the Elastic Compute Service (ECS) instance that is connected to the ApsaraDB for Redis instance. The ECS instance and ApsaraDB for Redis instance must be in the classic network of the same region or in the same Virtual Private Cloud (VPC).

Examples

Sample request

https://r-kvstore.aliyuncs.com/
?Action=DescribeBackups
&InstanceId=r-bp1xxxxxxxxxxxxx
&PagSize=30
&PageNumber=1
&StartTime=2019-03-11T10:00Z
&EndTime=2019-03-14T18:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeBackupsResponse>
      <PageNumber>1</PageNumber>
      <TotalCount>3</TotalCount>
      <PageSize>30</PageSize>
      <RequestId>6D7D871F-8A6B-40C2-85C7-3632D139EAFD</RequestId>
      <Backups>
            <Backup>
                  <BackupIntranetDownloadURL>http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx</BackupIntranetDownloadURL>
                  <BackupType>FullBackup</BackupType>
                  <BackupEndTime>2019-03-14T05:31:13Z</BackupEndTime>
                  <BackupMethod>Physical</BackupMethod>
                  <BackupId>336077354</BackupId>
                  <BackupStartTime>2019-03-14T05:28:50Z</BackupStartTime>
                  <BackupDownloadURL>https://rdsbak-hk45-v2.oss-cn-hongkong.aliyuncs.com/xxxxxxxxxxx</BackupDownloadURL>
                  <BackupDBNames>all</BackupDBNames>
                  <NodeInstanceId>r-bp1xxxxxxxxxxxxx</NodeInstanceId>
                  <BackupMode>Automated</BackupMode>
                  <BackupStatus>Success</BackupStatus>
                  <BackupSize>1024</BackupSize>
                  <EngineVersion>4.0</EngineVersion>
            </Backup>
            <Backup>
                  <BackupIntranetDownloadURL>http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx</BackupIntranetDownloadURL>
                  <BackupType>FullBackup</BackupType>
                  <BackupEndTime>2019-03-13T05:31:09Z</BackupEndTime>
                  <BackupMethod>Physical</BackupMethod>
                  <BackupId>335538809</BackupId>
                  <BackupStartTime>2019-03-13T05:28:46Z</BackupStartTime>
                  <BackupDownloadURL>http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx</BackupDownloadURL>
                  <BackupDBNames>all</BackupDBNames>
                  <NodeInstanceId>r-bp1xxxxxxxxxxxxx</NodeInstanceId>
                  <BackupMode>Automated</BackupMode>
                  <BackupStatus>Success</BackupStatus>
                  <BackupSize>1024</BackupSize>
                  <EngineVersion>4.0</EngineVersion>
            </Backup>
            <Backup>
                  <BackupIntranetDownloadURL>http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx</BackupIntranetDownloadURL>
                  <BackupType>FullBackup</BackupType>
                  <BackupEndTime>2019-03-12T05:31:14Z</BackupEndTime>
                  <BackupMethod>Physical</BackupMethod>
                  <BackupId>335001607</BackupId>
                  <BackupStartTime>2019-03-12T05:28:52Z</BackupStartTime>
                  <BackupDownloadURL>https://rdsbak-hk45-v2.oss-cn-hongkong.aliyuncs.com/http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx</BackupDownloadURL>
                  <BackupDBNames>all</BackupDBNames>
                  <NodeInstanceId>r-bp1xxxxxxxxxxxxx</NodeInstanceId>
                  <BackupMode>Automated</BackupMode>
                  <BackupStatus>Success</BackupStatus>
                  <BackupSize>1024</BackupSize>
                  <EngineVersion>4.0</EngineVersion>
            </Backup>
      </Backups>
</DescribeBackupsResponse>

JSON format

{
    "DescribeBackupsResponse": {
        "PageNumber": "1",
        "TotalCount": "3",
        "PageSize": "30",
        "RequestId": "6D7D871F-8A6B-40C2-85C7-3632D139EAFD",
        "Backups": {
            "Backup": [
                {
                    "BackupIntranetDownloadURL": "http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx",
                    "BackupType": "FullBackup",
                    "BackupEndTime": "2019-03-14T05:31:13Z",
                    "BackupMethod": "Physical",
                    "BackupId": "336077354",
                    "BackupStartTime": "2019-03-14T05:28:50Z",
                    "BackupDownloadURL": "https://rdsbak-hk45-v2.oss-cn-hongkong.aliyuncs.com/xxxxxxxxxxx",
                    "BackupDBNames": "all",
                    "NodeInstanceId": "r-bp1xxxxxxxxxxxxx",
                    "BackupMode": "Automated",
                    "BackupStatus": "Success",
                    "BackupSize": "1024",
                    "EngineVersion": "4.0"
                },
                {
                    "BackupIntranetDownloadURL": "http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx",
                    "BackupType": "FullBackup",
                    "BackupEndTime": "2019-03-13T05:31:09Z",
                    "BackupMethod": "Physical",
                    "BackupId": "335538809",
                    "BackupStartTime": "2019-03-13T05:28:46Z",
                    "BackupDownloadURL": "http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx",
                    "BackupDBNames": "all",
                    "NodeInstanceId": "r-bp1xxxxxxxxxxxxx",
                    "BackupMode": "Automated",
                    "BackupStatus": "Success",
                    "BackupSize": "1024",
                    "EngineVersion": "4.0"
                },
                {
                    "BackupIntranetDownloadURL": "http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx",
                    "BackupType": "FullBackup",
                    "BackupEndTime": "2019-03-12T05:31:14Z",
                    "BackupMethod": "Physical",
                    "BackupId": "335001607",
                    "BackupStartTime": "2019-03-12T05:28:52Z",
                    "BackupDownloadURL": "https://rdsbak-hk45-v2.oss-cn-hongkong.aliyuncs.com/http://rdsbak-hk45-v2.oss-cn-hongkong-internal.aliyuncs.com/xxxxxxxxxxx",
                    "BackupDBNames": "all",
                    "NodeInstanceId": "r-bp1xxxxxxxxxxxxx",
                    "BackupMode": "Automated",
                    "BackupStatus": "Success",
                    "BackupSize": "1024",
                    "EngineVersion": "4.0"
                }
            ]
        }
    }
}

Error codes

HTTP status code Error code Error message Description
400 InvalidStartTime.Malformed The Specified parameter StartTime is not valid. The error message returned because the verification of the start time failed owing to the incorrect format. The time must be in GMT. Example: 2011-06-11T16:00Z.
400 InvalidEndTime.Malformed The Specified parameter EndTime is not valid. The error message returned because the verification of the end time failed owing to the incorrect format. The time must be in GMT. Example: 2011-06-11T16:00Z.

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