All Products
Search
Document Center

Cloud Backup:AddDataSource

Last Updated:Mar 31, 2026

Creates a data source.

Operation description

  • The local NAS backup feature supports the local NAS (COMMON_NAS) data source type.

  • The CPFS backup feature supports the following data source types: CPFS (CPFS), CPFS AI-Computing Edition (BMCPFS), and other large-scale file system (COMMON_FILE_SYSTEM).

  • The archive feature supports the following data source types: local NAS (COMMON_NAS), HDFS (HDFS), and S3 (S3).

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

DataSourceType

string

Yes

The type of the data source.

COMMON_NAS

DataSourceName

string

Yes

The name of the data source.

MyLocalNas

Credential

string

No

The access credential for the data source. This parameter is required for local NAS (SMB) data sources and for OSS- or S3-compatible data sources. Examples:

  • Local NAS data source (SMB protocol): { "mountUsername": "*****", "mountPassword": "*****" }

  • OSS-compatible or S3-compatible data source: { "accessKeyId": "*****", "accessKeySecret": "*****" }

{ "mountUsername": "*****", "mountPassword": "*****" }

ConnectionInfo

string

No

The connection information for the data source. Examples:

  • Local NAS data source: { "dataServerAddresses": [ { "host": "123.123.123.123", "port": "8080" } ], "sharePath": "/share", "mountOptions": "vers=3", "fileSystemType": "nfs" }

  • CPFS AI-Computing Edition data source: {"vpcMountTarget":"cpfs-010wn***wy-vpc-ta***8.cn-shanghai.cpfs.aliyuncs.com","sharePath":"/"}

  • Other large-scale file system data source: {"path":"/mnt"}

{ "dataServerAddresses": [ { "host": "123.123.123.123", "port": "8080" } ], "sharePath": "/share", "mountOptions": "vers=3", "fileSystemType": "nfs" }

IndexLevel

string

No

The index level. This parameter applies only to data source analysis with the archive feature.

  • OFF: No index is created.

  • META: A metadata index is created.

  • ALL: A full-text index is created. (Deprecated)

META

ClusterId

string

No

The ID of the client group used to access the data source.

cl-0004i0nlngorvgjpl7ck

Schedule

string

No

The execution schedule. This parameter applies only to data source analysis with the archive feature. The format I|{startTime}|{interval} specifies a task that runs at a defined interval starting from {startTime}. {interval} is an ISO 8601 duration. For example, PT1H specifies a one-hour interval, and P1D specifies a one-day interval.

I|1729493847|P1D

SpeedLimit

string

No

The rate limiting settings. This parameter applies only to data source analysis with the archive feature.

6:21:10240

Options

string

No

The options for data source analysis. This parameter applies only to data source analysis with the archive feature.

{}

Include

string

No

A filter that specifies the files to include. This parameter applies only to data source analysis with the archive feature.

["/home/alice", "/home/bob"]

Exclude

string

No

A filter that specifies the files to exclude. This parameter applies only to data source analysis with the archive feature.

["/home/alice/log"]

Path

array

No

A list of paths for data source analysis. This parameter applies only to data source analysis with the archive feature.

string

No

A path for data source analysis. This parameter applies only to data source analysis with the archive feature.

/home

Response elements

Element

Type

Description

Example

object

Code

string

The HTTP status code.

200

Message

string

The response message.

successful

RequestId

string

The request ID.

53167AD3-****-****-92C7-CF69A000BA45

Success

boolean

Indicates whether the request is successful.

true

DataSourceId

string

The data source ID.

ds-000*******xzj

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "53167AD3-****-****-92C7-CF69A000BA45",
  "Success": true,
  "DataSourceId": "ds-000*******xzj"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.