You can call this operation to query the backups of a MongoDB 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 Yes DescribeBackups

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

StartTime String Yes 2019-03-12T12:00Z

The beginning of the time range to query. The time is in the format of yyyy-MM-dd T HH:mm z(UTC time).

End time String Yes 2019-03-13T12:00Z

The end of the time range that you want to query. The time must be later than the start time. The time is in the format of yyyy-MM-dd T HH:mm z(UTC time).

DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

Note If you specify this parameter to the ID of a sharded cluster instance, you must also specify the NodeId parameter.
NodeId String No d-bpxxxxxxxx

The ID of the shard in the sharded cluster instance.

Note This parameter is only valid when you specify the DBInstanceId parameter to the ID of a sharded cluster instance.
BackupId String No 5664xxxx

The backup ID.

PageNumber Integer No 1

The number of the page. Valid values: any non-zero positive Integer. Default value: 1.

PageSize Integer No 300

The number of records on each page. Valid values: 30, 50, and 100. Default value: 30.

RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

Response parameters

Prameter Type Sample response Description
PageNumber Integer 1

The number of the page returned.

PageSize Integer 300

The number of records to display on each page.

RequestId String 8925E66F-1971-4C8C-90A7-F93BF1867E25

The ID of the request.

TotalCount Integer 1

The total number of backups.

Backups Array

The detailed list of all returned backups.

Backup
BackupDBNames String mongodbtest, new, test

The name of the backup database.

BackupDownloadURL String http://xxxxx.oss-cn-hangzhou.aliyuncs.com/xxxxx/hinsxxxxx_data_xxxxx.tar.gz

The external download URL of the backup file. If the download URL is unavailable, this parameter is empty.

BackupEndTime String 2019-03-13T04:34:57Z

The end time of this backup, in the format of yyyy-MM-dd T HH:mm:ss z(UTC time).

BackupId Integer 11111111

The ID of the backup.

BackupIntranetDownloadURL String http://xxxxx.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx/xxxxx.tar.gz

The internal download URL of the backup file.

Note You can download the target backup file by using this url in the ECS instance connected to the current apsaradb for MongoDB instance. The ECS instance and apsaradb for MongoDB instance must be in the same classic network or VPC.
BackupMethod String Physical

The backup method.

  • Snapshot
  • Physical
  • Logical
BackupMode String Automated

The backup mode.

  • Automated
  • Manual
BackupSize Long 335520510

The size of the backup file. Unit: Bytes.

BackupStartTime String 2019-03-13T04:32:42Z

The start time of this backup, in the format of yyyy-MM-dd T HH:mm:ss z(UTC time).

BackupStatus String success

The status of the backup.

  • Success: The backup is successful.
  • Failed: backup failed.
BackupType String FullBackup

The backup type.

  • FullBackup
  • IncrementalBackup

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/? &Action= DescribeBackups
&StartTime=2019-03-12T12:00Z
&EndTime=2019-03-13T12:00Z
&DBInstanceId=dds-bpxxxxxxxx
&<Common request parameter>

Sample success response

XML format

<DescribeBackupsResponse>
      <PageNumber>1</PageNumber>
      <TotalCount>1</TotalCount>
      <PageSize>30</PageSize>
      <RequestId>09308D8E-136C-4053-89D8-51350248C31B</RequestId>
      <Backups>
            <Backup>
                  <BackupDownloadURL>http://xxxxx.oss-cn-hangzhou.aliyuncs.com/xxxxx/xxxxx.tar.gz</BackupDownloadURL>
                  <BackupIntranetDownloadURL>http://xxxxx.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx/xxxxx.tar.gz</BackupIntranetDownloadURL>
                  <BackupType>FullBackup</BackupType>
                  <BackupDBNames>mongousertest</BackupDBNames>
                  <BackupEndTime>2019-05-27T14:27:11Z</BackupEndTime>
                  <BackupMethod>Physical</BackupMethod>
                  <BackupMode>Automated</BackupMode>
                  <BackupSize>25849856</BackupSize>
                  <BackupStatus>Success</BackupStatus>
                  <BackupStartTime>2019-05-27T14:24:55Z</BackupStartTime>
                  <BackupId>11111</BackupId>
            </Backup>
      </Backups>
</DescribeBackupsResponse>

JSON format

{
    "PageNumber": 1,
    "TotalCount": 1,
    "PageSize": 30,
    "RequestId": "09308D8E-136C-4053-89D8-51350248C31B",
    "Backups": {
        "Backup": [
            {
                "BackupDownloadURL": "http://xxxxx.oss-cn-hangzhou.aliyuncs.com/xxxxx/xxxxx.tar.gz",
                "BackupIntranetDownloadURL": "http://xxxxx.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx/xxxxx.tar.gz",
                "BackupType": "FullBackup",
                "BackupDBNames": "mongousertest",
                "BackupEndTime": "2019-05-27T14:27:11Z",
                "BackupMethod": "Physical",
                "BackupMode": "Automated",
                "BackupSize": 25849856,
                "BackupStatus": "Success",
                "BackupStartTime": "2019-05-27T14:24:55Z",
                "BackupId": 11111
            }
        ]
    }
}

Error codes

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