Queries the databases at a specified time or contained in a specified backup set before restoring a database for an ApsaraDB for MongoDB instance.

Precautions

You can call the CreateDBInstance operation to restore a database for an ApsaraDB for MongoDB instance. For more information, see Restore one or more databases of an ApsaraDB for MongoDB instance.

Before you call this operation, make sure that the ApsaraDB for MongoDB instance meets the following requirements:

  • The instance was created after March 26, 2019.
  • The instance is located in the China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), or Singapore (Singapore) region. Other regions are not supported.
  • The instance is a replica set instance.
  • The version of the database engine is 3.4, 4.0, or 4.2.
  • The storage engine of the instance is WiredTiger.

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 DescribeBackupDBs

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

PageNumber Integer No 1

The number of the page to return. The value of this parameter must be an integer that is greater than 0. Default value: 1.

PageSize Integer No 30

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

SourceDBInstance String Yes dds-bp2286****

The ID of the source instance.

RestoreTime String No 2019-08-22T12:00:00Z

The point in time to which the instance is restored. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note
  • The time can be a point in time within the past seven days. The time must be earlier than the current time, but later than the time when the instance was created.
  • You must specify one of the RestoreTime and BackupId parameters.
BackupId String No 5664****

The ID of the backup set.

Note
  • You can call the DescribeBackups operation to query the backup ID.
  • You must specify one of the RestoreTime and BackupId parameters.
ResourceGroupId String No rg-ax68****

The ID of the resource group.

Response parameters

Parameter Type Example Description
TotalCount Integer 5

The number of returned databases.

Databases Array of Database

Details about the databases.

Database
DBName String mongodbtest

The name of the database.

RequestId String 1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455

The ID of the request.

PageSize Integer 30

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/?Action=DescribeBackupDBs
&PageNumber=1
&PageSize=30
&SourceDBInstance=dds-bp2286****
&RestoreTime=2019-08-22T12:00:00Z
&BackupId=5664****
&ResourceGroupId=rg-ax68****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<DescribeBackupDBsResponse>
    <Databases>
        <Database>
            <DBName>admin</DBName>
        </Database>
        <Database>
            <DBName>config</DBName>
        </Database>
        <Database>
            <DBName>mongodbtest</DBName>
        </Database>
        <Database>
            <DBName>db1</DBName>
        </Database>
        <Database>
            <DBName>db2</DBName>
        </Database>
    </Databases>
    <PageNumber>1</PageNumber>
    <TotalCount>5</TotalCount>
    <PageSize>30</PageSize>
    <RequestId>1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455</RequestId>
</DescribeBackupDBsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Databases" : {
    "Database" : [ {
      "DBName" : "admin"
    }, {
      "DBName" : "config"
    }, {
      "DBName" : "mongodbtest"
    }, {
      "DBName" : "db1"
    }, {
      "DBName" : "db2"
    } ]
  },
  "PageNumber" : 1,
  "TotalCount" : 5,
  "PageSize" : 30,
  "RequestId" : "1AF0AD89-ED4F-44AD-B65F-BFC1D5CD9455"
}

Error codes

HTTP status code Error code Error message Description
403 IncorrectDBInstanceType Current DB instance type does not support this operation. The error message returned because the operation is not supported by this instance category.

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