Call the CreateAndStartBackupPlan interface to create, configure and start a backup plan.

Please make sure that you have fully understood the DBS products before using this interface. Charge method and price .

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 CreateAndStartBackupPlan

The system specifies the parameters. Valid values: CreateAndStartBackupPlan .

BackupMethod String Yes logical

The backup method. Valid values:

  • logical : logical backup
  • physical : physical backup
  • duplication : dump backups
BackupPlanName String Yes dbstooi0*******

The name of the backup plan.

DatabaseType String Yes MySQL

The database engine that is run on the instances. Valid values:

  • MySQL
  • MSSQL
  • Oracle
  • MariaDB
  • PostgreSQL
  • PPAS
  • DRDS
  • MongoDB
  • Redis
  • File
InstanceClass String Yes micro

The specification of the backup plan. Valid values:

  • micro
  • small
  • medium
  • large
  • xlarge
Note The higher the specification, the higher the backup and recovery performance. For more information, see Specifications .
SourceEndpointInstanceType String Yes RDS

The location of the database. Value:

  • RDS
  • ECS
  • Express : database accessed through leased line /VPN Gateway /smart gateway
  • Agent : the database accessed through the backup gateway
  • DDS : Cloud MongoDB
  • Other : Database directly connected via IP:Port
BackupPlanId String No dbstooi0*******

The ID of the backup schedule.

Region String No cn-hangzhou

DBS region, value:

  • cn-hangzhou : public cloud Hangzhou
  • cn-shanghai : Public Cloud Shanghai
  • cn-qingdao : Public Cloud Qingdao
  • cn-beijing : Public Cloud Beijing
  • cn-shenzhen : Public Cloud Shenzhen
  • cn-hongkong : Public Cloud Hong Kong, China
  • ap-southeat-1 : Public Cloud Singapore
  • cn-hangzhou-finance : Finance Cloud Hangzhou
  • cn-shanghai-finance : Financial Cloud Shanghai
  • cn-shenzhen-finance : Financial Cloud Shenzhen
Period String No Year

The unit of the subscription period. Valid values:

  • Year : package year
  • Month : monthly
UsedTime Integer No 1

The subscription period of the instances. Valid values:

  • When parameters Period For Year When, UsedTime The value is 1~9
  • When parameters Period For Month When, UsedTime The value is 1~11
PayType String No Postpaid

Payment method, value:

  • Postpaid : Postpaid (pay-as-you-go)
  • prepay : Prepaid (package year and month)
Note default prepay, currently only BackupMethod For duplication When supported postpay .
DatabaseRegion String No cn-hangzhou

The region where the destination database is deployed.

Note When PayType For postpay This parameter is required.
StorageRegion String No cn-hangzhou

The region where the processed file is stored.

Note When PayType For postpay This parameter is required.
InstanceType String No RDS

Database instance type. Value:

  • RDS
  • PolarDB
  • DDS
  • Kvstore
  • Other
    Note When PayType For postpay When, must choose.
StorageType String No None

This parameter is unavailable.

FromApp String No OpenApi

Specifies the request source. The default value is OpenApi and cannot be changed.

SourceEndpointRegion String No cn-hangzhou

The region where the destination database is deployed.

Note SourceEndpoint . InstanceType For RDS , ECS , DDS , Express , Agent , the parameter must be passed.
SourceEndpointInstanceID String No rm-uf6wjk5xxxxxxxxxx

The ID of the cluster.

Note SourceEndpoint . InstanceType For RDS , ECS , DDS , Express , the parameter must be passed.
SourceEndpointIP String No rm-uf6wjk5xxxxxxx.mysql.rds.aliyuncs.com

The endpoint that is used to connect to the instance.

Note SourceEndpoint . InstanceType For express , agent , other , the parameter must be passed.
SourceEndpointPort Integer No 3306

The port that is used to connect to the destination database.

Note SourceEndpoint . InstanceType For express , agent , other , ECS , the parameter must be passed.
SourceEndpointDatabaseName String No testRDS

The name of the database.

Note The database type is PostgreSQL , MongoDB , the parameter must be passed.
SourceEndpointUserName String No testRDS

The database account.

Note The database type is Redis , or the location of the database is agent and the database type is MSSQL This parameter is not required and must be passed in other scenarios.
SourceEndpointPassword String No testPassword

The password that is used to connect to the instance.

Note The database type is Redis , or the location of the database is agent and the database type is MSSQL This parameter is not required and must be passed in other scenarios.
BackupGatewayId Long No 23313123312

The ID of the backup gateway.

Note SourceEndpoint . InstanceType For agent , the parameter must be passed.
OSSBucketName String No TestOssBucket

The name of the OSS bucket to which you want to ship log data.

Default: The system automatically generates a new name.

BackupObjects String No [{"DBName":"Name of database to be backed up", "SchemaName":"Name of schema to be backed up", "TableIncludes":[{"TableName":"Name of table to be backed up" }], "TableExcludes":[{"TableName":"Name of database to be backed up does not require the name of the table to be backed up" }]]

The backup object.

BackupPeriod String No Monday

Full backup cycle. Valid values:

  • Monday : Monday
  • Tuesday : Tuesday
  • Wednesday : Wednesday
  • Thursday : Thursday
  • Friday : Friday
  • Saturday : Saturday
  • Sunday : Sunday
BackupStartTime String No 14:22

The full backup start time, in the format of HH:mm Z(UTC time).

EnableBackupLog Boolean No true

Whether to enable incremental log backup. Valid values:

  • true : on
  • false : Close
BackupLogIntervalSeconds Integer No 1000

The incremental time interval, in seconds.

Note Only physical backup is supported.
BackupRetentionPeriod Integer No 730

The retention time of backup data. Value: 0-1825. The default value is 730.

DuplicationInfrequentAccessPeriod Integer No 180

The storage time is converted to low frequency access, which is 180 by default.

DuplicationArchivePeriod Integer No 365

The storage time for conversion to archive cold standby is 365 by default.

SourceEndpointOracleSID String No test

Oracle SID name. This parameter is required when the database type is Oracle.

BackupStorageType String No None

Built-in storage type:

  • Default Empty: Backup data is stored on user OSS.
  • system: The backup data is stored on the built-in OSS of DBS.
BackupSpeedLimit Long No 262144

Disk IO limit, in KB/S.

Note It takes effect only for MySQL physical backups.
BackupRateLimit Long No 262144

The network bandwidth limit, in KB/s, allows a maximum of 10GB.

Note It takes effect only for MySQL physical backups.
BackupStrategyType String No simple

Full backup cycle. Valid values:

  • simple : periodic backup, used with BackupPeriod and BackupStartTime.
  • manual : manual backup.
Note Default is simple .
CrossAliyunId String No 2xxx7778xxxxxxxxxx

the uid of cross-alibaba cloud account backup.

CrossRoleName String No test123

The name of the RAM role that is backed up across Alibaba Cloud accounts.

RegionId String No cn-hangzhou

Region ID, you can call DescribeRegions Queries.

ClientToken String No DBS

Any string.

Response parameters

Parameter Type Example Description
BackupPlanId String dbs1hvb0wwweusfa

The ID of the backup schedule.

ErrCode String Param.NotFound

The error code returned.

ErrMessage String The specified parameter %s value is not valid.

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

OrderId String 2056157***

The order ID of the instance.

RequestId String 4F1888AC-1138-4995-B9FE-D2734F61C058

The ID of the request.

Success Boolean true

Indicates whether the request is successful. Valid values: true and false.

Examples

Sample requests


     http(s)://[Endpoint]/?Action=CreateAndStartBackupPlan &BackupMethod=logical &BackupPlanName=dbstooi0 ******* &DatabaseType=MySQL &InstanceClass=micro &SourceEndpointInstanceType=RDS &<Public request parameters> 
   

Sample success responses

XML format


     <CreateAndStartBackupPlanResponse> <RequestId>3321E2F6-98E3-4B81-ADEC-9FD1BC06249A</RequestId> <HttpStatusCode>200</HttpStatusCode> <BackupPlanId>dbs1hrlzt68t7ko1</BackupPlanId> <OrderId>208422747270728</OrderId> <Success>true</Success> </CreateAndStartBackupPlanResponse> 
   

JSON format


     { "RequestId": "3321E2F6-98E3-4B81-ADEC-9FD1BC06249A", "HttpStatusCode": 200, "BackupPlanId": "dbs1hrlzt68t7ko1", "OrderId": 208422747270728, "Success": true } 
   

Error codes

Go to the Error Center View more error codes.