首页 CreateAndStartBackupPlan

CreateAndStartBackupPlan

更新时间: 2026-12-03 21:32:50

Creates, configures, and starts a backup schedule.

Operation description

Before you call this operation, make sure that you fully understand the billing methods and pricing of Database Backup (DBS).

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dbs:CreateAndStartBackupPlan

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

BackupPlanId

string

No

The ID of the backup schedule.

dbstooi0*******

Region

string

No

The region supported by DBS. You can call the DescribeRegions operation to query the supported regions.

cn-hangzhou

InstanceClass

string

Yes

The specifications of the backup schedule. Valid values:

  • micro

  • small

  • medium

  • large

  • xlarge

Note

Higher specifications provide better backup and recovery performance. For more information, see Specifications.

micro

DatabaseType

string

Yes

The type of the database. Valid values:

  • MySQL

  • MSSQL

  • Oracle

  • MariaDB

  • PostgreSQL

  • DRDS

  • MongoDB

  • Redis

MySQL

BackupMethod

string

Yes

The backup method. Valid values:

  • logical: Logical backup.

  • physical: Physical backup.

logical

Period

string

No

The subscription period of the instance. Valid values:

  • Year: Yearly.

  • Month: Monthly.

Year

UsedTime

integer

No

The subscription duration. Valid values:

  • If the Period parameter is set to Year, the value ranges from 1 to 5.

  • If the Period parameter is set to Month, the value ranges from 1 to 11.

1

PayType

string

No

The payment method. Valid values:

prepay: Upfront (subscription).

prepay

DatabaseRegion

string

No

The region of the database.

cn-hangzhou

StorageRegion

string

No

The storage region.

cn-hangzhou

InstanceType

string

No

The type of the database instance. Valid values:

  • RDS

  • PolarDB

  • DDS: ApsaraDB for MongoDB.

  • Kvstore: ApsaraDB for Redis.

  • Other: A database connected by using an IP address and a port number.

  • dg: A self-managed database without a public IP address or port number, which is connected by using Database Gateway.

RDS

StorageType

string

No

This parameter is not available.

None

FromApp

string

No

The source of the request. Default value: OpenApi. You do not need to specify this parameter.

OpenApi

SourceEndpointInstanceType

string

Yes

The location of the database. Valid values:

  • RDS

  • ECS

  • Express: A database connected over Express Connect, VPN Gateway, or Smart Access Gateway.

  • Agent: A database connected by using a backup gateway.

  • DDS: ApsaraDB for MongoDB.

  • Other: A database connected by using an IP address and a port number.

  • dg: A self-managed database without a public IP address or port number, which is connected by using Database Gateway.

RDS

SourceEndpointRegion

string

No

The region of the database.

Note

This parameter is required if the SourceEndpoint.InstanceType parameter is set to RDS, ECS, DDS, Express, or Agent.

cn-hangzhou

SourceEndpointInstanceID

string

No

The database instance ID.

Note

This parameter is required if the SourceEndpoint.InstanceType parameter is set to RDS, ECS, DDS, or Express.

rm-uf6wjk5xxxxxxxxxx

SourceEndpointIP

string

No

The database connection address.

Note

This parameter is required if the SourceEndpoint.InstanceType parameter is set to express, agent, or other.

rm-uf6wjk5xxxxxxx.mysql.rds.aliyuncs.com

SourceEndpointPort

integer

No

The port number of the database.

Note

This parameter is required if the SourceEndpoint.InstanceType parameter is set to express, agent, other, or ECS.

3306

SourceEndpointDatabaseName

string

No

The name of the database.

Note

This parameter is required if the database type is PostgreSQL or MongoDB.

testRDS

SourceEndpointUserName

string

No

The username of the database.

Note

This parameter is optional if the database type is Redis, or if the database location is agent and the database type is MSSQL. In other scenarios, this parameter is required.

testRDS

SourceEndpointPassword

string

No

The password of the database.

Note

This parameter is optional if the database type is Redis, or if the database location is agent and the database type is MSSQL. In other scenarios, this parameter is required.

testPassword

BackupGatewayId

integer

No

The ID of the backup gateway.

Note
  • This parameter is required if the SourceEndpoint.InstanceType parameter is set to agent.

  • For more information about how to create a backup gateway, see Add a backup gateway.

  • You can call the DescribeBackupGatewayList operation to query the list of existing backup gateways.

23313123312

OSSBucketName

string

No

The name of the OSS bucket. Default value: A new name is automatically generated by the system.

TestOssBucket

BackupObjects

string

No

The backup objects.

[ { "DBName":"Name of the database to be backed up", "SchemaName":"Name of the schema to be backed up", "TableIncludes":[{ "TableName":"Name of the table to be backed up" }], "TableExcludes":[{ "TableName":"Name of the table that does not need to be backed up in the database" }] } ]

BackupPeriod

string

No

The full backup cycle. Valid values:

  • Monday: Monday.

  • Tuesday: Tuesday.

  • Wednesday: Wednesday.

  • Thursday: Thursday.

  • Friday: Friday.

  • Saturday: Saturday.

  • Sunday: Sunday.

Note

You can specify multiple values. Separate the values with commas (,).

Monday

BackupStartTime

string

No

The start time of the full backup. The time is in the HH:mm format and displayed in UTC.

14:22

EnableBackupLog

boolean

No

Specifies whether to enable incremental log backup. Valid values:

  • true: Enabled.

  • false: Disabled.

true

BackupLogIntervalSeconds

integer

No

The interval for incremental backup, in seconds.

Note

This parameter is required only for physical backup.

1000

BackupRetentionPeriod

integer

No

The retention period of the backup data. Valid values: 0 to 1825. Default value: 730. Unit: days.

730

DuplicationInfrequentAccessPeriod

integer

No

The period after which the storage type is converted to Infrequent Access. Default value: 180. Unit: days.

180

DuplicationArchivePeriod

integer

No

The period after which the storage type is converted to Archive. Default value: 365. Unit: days.

365

BackupPlanName

string

Yes

The custom name of the backup schedule.

dbstooi0*******

SourceEndpointOracleSID

string

No

The Oracle SID. This parameter is required if the database type is Oracle.

test

BackupStorageType

string

No

The built-in storage type. Valid values:

  • Empty (default): The backup data is stored in your OSS bucket.

  • system: The backup data is stored in the built-in OSS bucket of DBS.

None

BackupSpeedLimit

integer

No

The disk I/O limit. Unit: KB/s.

Note

This parameter takes effect only for MySQL physical backup.

262144

BackupRateLimit

integer

No

The network bandwidth throttling. Unit: KB/s. Maximum value: 10 GB.

Note

This parameter takes effect only for MySQL physical backup.

262144

BackupStrategyType

string

No

The full backup cycle. Valid values:

  • simple: Epoch backup. This value is used together with the BackupPeriod and BackupStartTime parameters.

  • manual: Manual backup.

Note

Default value: simple.

simple

CrossAliyunId

string

No

The UID of the Alibaba Cloud account for cross-account backup.

1648821913******

CrossRoleName

string

No

The name of the RAM role for cross-account backup.

test123

ClientToken

string

No

The client token that is used to ensure the idempotence of the request and prevent duplicate submissions.

ASDASDASDSADASFCZXVZ

ResourceGroupId

string

No

The ID of the resource group.

rg-aekzecovzti****

Response elements

Element

Type

Description

Example

object

The response parameters.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The request ID.

4F1888AC-1138-4995-B9FE-D2734F61C058

CreateBackupSet

boolean

Indicates whether the backup set is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

true

ErrCode

string

The error code.

Param.NotFound

Success

boolean

Indicates whether the request is successful.

true

ErrMessage

string

The error message.

The specified parameter %s value is not valid.

BackupPlanId

string

The ID of the backup schedule.

dbs1hvb0wwwe****

OrderId

string

The order ID.

2056157***

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "RequestId": "4F1888AC-1138-4995-B9FE-D2734F61C058",
  "CreateBackupSet": true,
  "ErrCode": "Param.NotFound",
  "Success": true,
  "ErrMessage": "The specified parameter %s value is not valid.",
  "BackupPlanId": "dbs1hvb0wwwe****",
  "OrderId": "2056157***"
}

Error codes

HTTP status code

Error code

Error message

Description

403 Request.Forbidden Have no Permissions You are not authorized to perform the current operation. Contact the Alibaba Cloud account to grant permissions in the Resource Access Management (RAM) console before you perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.

阿里云首页 数据管理 相关技术圈