Manually backs up an ApsaraDB for MongoDB instance.

Usage

When you call this operation, the instance must be in the Running state.

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 CreateBackup

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

RegionId String No cn-hangzhou

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

DBInstanceId String Yes d-bp2235****

The ID of the instance.

BackupMethod String No Logical

The backup method of the instance. Default value: Physical. Valid values:

  • Logical
  • Physical
Note Only replica set instances and sharded cluster instances support this parameter. You do not need to specify this parameter for standalone instances. All standalone instances use snapshot backup.

Response parameters

Parameter Type Example Description
BackupId String 5664****

The ID of the backup set.

RequestId String 7016B12F-7F64-40A4-BAFF-013F02AC82FC

The ID of the request.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/?Action=CreateBackup
&DBInstanceId=d-bp2235****
&BackupMethod=Logical
&<Common request parameters>

Sample success responses

XML format

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

<CreateBackupResponse>
    <BackupId>5664****</BackupId>
    <RequestId>7016B12F-7F64-40A4-BAFF-013F02AC82FC</RequestId>
</CreateBackupResponse>

JSON format

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

{
  "BackupId" : "5664****",
  "RequestId" : "7016B12F-7F64-40A4-BAFF-013F02AC82FC"
}

Error codes

HTTP status code Error code Error message Description
403 OperationDenied.BackupJobExists The operation is not permitted due to backup job exist. The error message returned because the instance has a backup task performed. Try again later.

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