All Products
Search
Document Center

Cloud Backup:CreateBackupJob

Last Updated:Aug 28, 2026

Creates a backup job.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

JobName

string

No

The name of the backup job.

k8s-backup-infra-20220131150046-hbr

SourceType

string

Yes

The type of the data source. Valid values:

  • UDM_ECS: Elastic Compute Service (ECS) instance

Valid values:

  • UDM_ECS :

CONTAINER

Retention

integer

No

The retention period of the backup data. Unit: days.

15

InstanceId

string

No

Required only if SourceType is set to UDM_ECS. The ID of the ECS instance.

i-bp1xxxxxxxxxxxxxxysm

Detail

object

No

Required only if SourceType is set to UDM_ECS. A JSON string with the following fields:

  • doCopy: whether to enable remote replication.

  • destinationRegionId: the destination region for remote replication.

  • destinationRetention: the retention period of the backup point for remote replication.

  • diskIdList: the IDs of the disks to back up. If empty, all disks are backed up.

  • snapshotGroup: whether to use a snapshot-consistent group. Valid only if all disks of the ECS instance are Enterprise SSDs (ESSDs).

  • appConsistent: whether to enable application-consistent backup. Must be used with preScriptPath and postScriptPath.

  • preScriptPath: the path to the pre-freeze scripts.

  • postScriptPath: the path to the post-thaw scripts.

  • enableWriters: Required only if AppConsistent is set to true. Whether to create application-consistent snapshots.

    • true: creates application-consistent snapshots.

    • false: creates file system-consistent snapshots.

  • enableFsFreeze: Required only if AppConsistent is set to true. Whether to enable Linux fsfreeze to set file systems to read-only before creating application-consistent snapshots. Default value: true.

  • timeoutSeconds: Required only if AppConsistent is set to true. The I/O freeze timeout period. Default value: 30. Unit: seconds.

{ "doCopy": false, "destinationRegionId": "", "destinationRetention": null, "diskIdList": [], "snapshotGroup": false, "appConsistent": false, "enableWriters": true, "preScriptPath": "", "postScriptPath": "", "enableFsFreeze": true, "timeoutInSeconds": 60 }

BackupType

string

No

The backup type. This parameter is required only if you set the SourceType parameter to UDM_ECS.

  • COMPLETE: full backup

Valid values:

  • COMPLETE :

INCREMENTAL

VaultId

string

No

The ID of the backup vault. This parameter is not required if you set the SourceType parameter to UDM_ECS.

v-000xxxxxxxxxxxxxxy1v

SpeedLimit

string

No

Does not take effect if SourceType is set to UDM_ECS. Specifies throttling rules. Format: {start}|{end}|{bandwidth}. Separate multiple rules with vertical bars (|). Time ranges cannot overlap.

  • start: the start hour.

  • end: the end hour.

  • bandwidth: the bandwidth. Unit: KB/s.

0:24:NaN

Options

string

No

You do not need to specify this parameter.

{"UseVSS":false}

Include

string

No

Does not take effect if SourceType is set to UDM_ECS. The paths to the files to back up. Maximum length: 255 characters.

["/home/alice/*.pdf", "/home/bob/*.txt"]

Exclude

string

No

Does not take effect if SourceType is set to UDM_ECS. The paths to the files to exclude from backup. Maximum length: 255 characters.

["/var", "/proc"]

ClusterId

string

No

You do not need to specify this parameter.

cl-00068btz******oku

ContainerResources

string

No

You do not need to specify this parameter.

[{\"resourceType\":\"PV\",\"backupMethod\":\"FILE\",\"resourceId\":\"674dac6d-74cd-47e9-a675-09e2f10d2c45\",\"resourceInfo\":\"{\\\"pv_name\\\":\\\"nas-650dac6d-74cd-47e9-a675-09e2f10d2c45\\\",\\\"pv_size\\\":\\\"8Gi\\\",\\\"storage_class\\\":\\\"alibabacloud-cnfs-nas\\\",\\\"pvc_name\\\":\\\"data-postgresql-default-0\\\",\\\"namespace\\\":\\\"database\\\"}\",\"host\":\"cn-huhehaote.192.168.13.133\",\"hostPrefix\":\"6f5e758e-8d35-4584-b9ce-8333adfc7547/volumes/kubernetes.io~csi/nas-670dac6d-74cd-47e9-a675-09e2f10d2c45/mount\",\"pvPath\":\"/\"}]

InitiatedByAck

boolean

No

false or left empty

false

ContainerClusterId

string

No

You do not need to specify this parameter.

cc-000xxxxxxxxxxxxxxi00

CrossAccountType

string

No

Whether to back up data within the same Alibaba Cloud account or across accounts. Valid values:

  • SELF_ACCOUNT: Back up data within the same Alibaba Cloud account.

  • CROSS_ACCOUNT: Back up data across Alibaba Cloud accounts.

SELF_ACCOUNT

CrossAccountUserId

integer

No

The ID of the source Alibaba Cloud account that authorizes the current account for cross-account backup.

158975xxxxxx4625

CrossAccountRoleName

string

No

The name of the RAM role created within the source Alibaba Cloud account and assigned to the current account for cross-account backup authorization.

BackupRole

Response elements

Element

Type

Description

Example

object

Code

string

The HTTP status code. 200 indicates a successful request.

200

Message

string

The returned message. Returns "successful" on success or an error message on failure.

successful

RequestId

string

The request ID.

25F49E7B-7E39-542E-83AD-62E6E7F73786

Success

boolean

Whether the request was successful. Valid values:

  • true

  • false

true

JobId

string

The ID of the backup job.

job-000csy09q50a2jdcbwbo

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "25F49E7B-7E39-542E-83AD-62E6E7F73786",
  "Success": true,
  "JobId": "job-000csy09q50a2jdcbwbo"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.