DescribeBackupJobs2

Updated at:

Queries one or more backup jobs that meet the specified conditions.

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

hbr:DescribeBackupJobs2

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number. Pages start from 1. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Minimum value: 1. Maximum value: 99. Default value: 10.

10

SourceType

string

No

The data source type. Valid values:

  • ECS_FILE: ECS File Backup.

  • OSS: Alibaba Cloud OSS.

  • NAS: Alibaba Cloud NAS.

  • OTS: Alibaba Cloud OTS.

  • UDM_ECS: ECS instances.

  • UDM_ECS_DISK: Cloud disk backup sub-nodes for ECS instance backups.

  • COMMON_NAS: General NAS data sources, including archive NAS data sources and on-premises NAS data sources. You must use the Values parameter of Filters to specify the data source type.

  • File: On-premises File Backup.

  • SYNC: Data synchronization.

  • COMMON_FILE_SYSTEM: CPFS backup with agents.

  • CPFS: Agentless CPFS backup.

ECS_FILE

SortDirection

string

No

The sort direction. Valid values:

  • ASCEND: Ascending order.

  • DESCEND: Descending order. This is the default value.

Valid values:

  • ASCEND
  • DESCEND

DESCEND

Filters

array<object>

No

The key-value pairs in the query filter.

object

No

The query filter.

Key

string

No

The key in the query filter. Valid values:

  • RegionId: The region ID.

  • PlanId: The backup plan ID.

  • JobId: The backup job ID.

  • VaultId: The vault ID.

  • InstanceId: The ECS instance ID.

  • Bucket: The OSS bucket name.

  • FileSystemId: The file system ID.

  • Status: The job status.

  • CreatedTime: The start time of the job.

  • CompleteTime: The end time of the job.

  • InstanceName: The Tablestore instance name.

  • BackupType: The backup job type. This parameter is required only when SourceType is set to COMMON_NAS.

  • ParentId: The ID of the parent job. This parameter is required when you query subtasks. For example, when SourceType is set to UDM_ECS_DISK, you must specify the ID of a UDM_ECS job.

VaultId

Operator

string

No

The matching mode. Default value: IN. This parameter specifies the matching operator for the key and value in the filter. Valid values:

  • EQUAL: Equal to.

  • NOT_EQUAL: Not equal to.

  • GREATER_THAN: Greater than.

  • GREATER_THAN_OR_EQUAL: Greater than or equal to.

  • LESS_THAN: Less than.

  • LESS_THAN_OR_EQUAL: Less than or equal to.

  • BETWEEN: Between. The value is a JSON array in the [lower bound, upper bound] format.

  • IN: In. The value is an array.

Note

When you use CompleteTime as the key, the IN operator is not supported.

IN

Values

array

No

The values of the query filter.

string

No

The values of the query filter.

  • COMPLETE: On-premises NAS backup.

0: ARCHIVE: Archive NAS data source.

1: ARCHIVE_BY_SEARCH: Archive NAS data source.

COMPLETE

Edition

string

No

The edition type. Valid values: BASIC and STANDARD. Default value: STANDARD.

STANDARD

Response elements

Element

Type

Description

Example

object

BackupJobs

object

BackupJob

array<object>

The list of backup jobs that meet the specified conditions.

array<object>

The details of the backup job.

ActualBytes

integer

The actual data volume of the backup job after deduplication. Unit: bytes.

600

ActualFiles

integer

The actual number of files processed.

8

ActualItems

integer

This parameter is valid only when SourceType is set to ECS_FILE. The actual number of items in the backup job.

6

BackupType

string

The backup type. A value of COMPLETE indicates a full backup.

COMPLETE

Bucket

string

This parameter is valid only when SourceType is set to OSS. The name of the OSS bucket to back up.

hbr-backup-oss

BytesDone

integer

The data volume of the incremental backup. Unit: bytes.

800

BytesTotal

integer

The total data volume of the data source. Unit: bytes.

1000

ChangeListPath

string

The configuration of the incremental file synchronization list. This parameter is required only for synchronization.

{"dataSourceId": "ds-123456789", "path": "/changelist"}

ClientId

string

This parameter is valid only when SourceType is set to ECS_FILE. The ID of the backup client.

c-*********************

CompleteTime

integer

The time when the backup job was completed. The time is a UNIX timestamp. Unit: seconds.

1554347313

CreateTime

integer

This parameter is valid only when SourceType is set to NAS. The time when the file system was created. The time is a UNIX timestamp. Unit: seconds.

1607436917

CreatedTime

integer

The time when the backup job was created. The time is a UNIX timestamp. Unit: seconds.

1554347313

CrossAccountRoleName

string

The name of the RAM role created in the source account for the cross-account backup managed by the current account.

BackupRole

CrossAccountType

string

The cross-account backup type. Valid values:

  • SELF_ACCOUNT: same-account backup

  • CROSS_ACCOUNT: cross-account backup

SELF_ACCOUNT

CrossAccountUserId

integer

The ID of the source account for the cross-account backup managed by the current account.

158975xxxxx4625

DestDataSourceDetail

string

The details of the destination data source. This parameter is required only for synchronization.

{\"prefix\":\"/\"}

DestDataSourceId

string

The ID of the destination data source. This parameter is required only for synchronization.

ds-000cov4ufudxklj24zdk

DestSourceType

string

The type of the destination data source. This parameter is required only for synchronization.

OSS

Detail

object

The details of the ECS instance backup job.

DestinationNativeSnapshotErrorMessage

string

The error message for cross-region replication failure.

ECS.CreatingSnapshot

DestinationNativeSnapshotId

string

The ID of the cross-region replication snapshot.

s-******************

DestinationNativeSnapshotProgress

integer

The progress of cross-region replication.

85

DestinationNativeSnapshotStatus

string

The status of cross-region replication.

COMPLETE

DestinationRetention

integer

The retention period for the cross-region replication backup.

30

DestinationSnapshotId

string

The ID of the cross-region replication backup.

s-******************

DiskNativeSnapshotIdList

object

DiskNativeSnapshotId

array

The mapping between snapshots and cloud disks.

string

The snapshot ID.

s-******************

DoCopy

boolean

Specifies whether to perform cross-region replication.

true

InstanceInfos

object

The ECS instance information, including the instance name and instance type.

{ "i-xxxxxxxx": { "hostName": "test", "instanceName": "test", "instanceType": "ecs.c7.xlarge", "osType": "linux", "diskIds": [ "d-xxxxxxxx01", "d-xxxxxxxx02" ], "osNameEn": "Rocky Linux 8.8 64 bit", "osName": "Rocky Linux 8.8 64-bit", "platform": "Rocky Linux" } }

NativeSnapshotId

string

The snapshot ID.

s-******************

ErrorMessage

string

The error message of the backup job.

PARTIAL_COMPLETE

Exclude

string

This parameter is required only when SourceType is set to ECS_FILE. The paths to exclude from the backup. All files in these paths are not backed up. Maximum length: 255 characters.

["/var", "/proc"]

FileSystemId

string

This parameter is valid only when SourceType is set to NAS. The ID of the file system.

005494

FilesDone

integer

The number of files that have been processed.

9

FilesTotal

integer

The total number of files to be processed.

10

Identifier

string

This parameter is returned only when SourceType is set to CONTAINER. The identifier of the cluster backed up by the container backup job. If the cluster is an Alibaba Cloud Container Service for Kubernetes (ACK) cluster, this value is the Kubernetes cluster ID.

c83**************************b76

Include

string

The backup paths included in the backup job.

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

InstanceId

string

This parameter is valid only when SourceType is set to NAS. The ECS instance ID.

i-*********************

InstanceName

string

The name of the Tablestore instance.

instancename

ItemsDone

integer

This parameter is valid only when SourceType is set to ECS_FILE. The number of backed-up items.

8

ItemsTotal

integer

This parameter is valid only when SourceType is set to ECS_FILE. The total number of items in the data source.

10

JobId

string

The ID of the backup job.

job-000g********w7

JobName

string

The name of the backup job.

jobname

Options

string

This parameter is required only when SourceType is set to ECS_FILE. Specifies whether to use Windows Volume Shadow Copy Service (VSS) to define the source paths.

  • This feature is supported only for Windows ECS instances.

  • If data in the backup source changes and you need to ensure consistency between the backup data and the source data, set this parameter to ["UseVSS":true].

  • After you enable VSS, you cannot back up multiple file folders at the same time.

{"UseVSS":false}

OtsDetail

object

The details of the Tablestore instance.

TableNames

object

TableName

array

The list of table names in the Tablestore instance.

string

The name of the table in the Tablestore instance.

["table1", "table2", "table3"]

Paths

object

Path

array

The backup path.

string

The backup path.

"/home"

PlanId

string

The ID of the backup plan.

plan-20********35

Prefix

string

This parameter is valid only when SourceType is set to OSS. The prefix of the objects to back up.

example/

Progress

integer

The backup progress. A value of 10000 indicates 100%.

10000

Report

object

The job report.

FailedFiles

string

The list of failed files.

/temp/report/158975xxxxxx4625/r-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_failed.zip

ReportTaskStatus

string

The generation status of the report.

COMPLETE

SkippedFiles

string

The list of skipped files.

/temp/report/158975xxxxxx4625/r-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_skipped.zip

SuccessFiles

string

The list of successful files.

/temp/report/158975xxxxxx4625/r-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_success.zip

TotalFiles

string

The list of all files. This field is not returned for data synchronization.

/temp/report/158975xxxxxx4625/job-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_total.csv

SourceType

string

The data source type. Valid values:

  • ECS_FILE: ECS file backup

  • OSS: Alibaba Cloud OSS backup

  • NAS: Alibaba Cloud NAS backup

  • OTS: Alibaba Cloud Tablestore backup

  • UDM_ECS: ECS instance backup

  • UDM_ECS_DISK: cloud disk backup subtask for ECS instance backup

  • COMMON_NAS: general NAS data source, including archive NAS data sources and on-premises NAS data sources. You must use the Values of Filters to distinguish the data source types.

  • File: on-premises file backup

  • SYNC: data synchronization

  • COMMON_FILE_SYSTEM: CPFS backup with agent

  • CPFS: agentless CPFS backup

ECS_FILE

Speed

integer

The actual average backup speed. Unit: KB/s.

500

SpeedLimit

string

This parameter is required only when SourceType is set to ECS_FILE. The traffic throttling configuration for the backup. Format: {start}|{end}|{bandwidth}. Separate multiple traffic throttling configurations with |. The configured time periods cannot overlap.

  • start: the start hour

  • end: the end hour

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

0:24:5120

StartTime

integer

The time when the backup job started. The time is a UNIX timestamp. Unit: seconds.

1554347313

Status

string

The status of the backup job. Valid values:

  • COMPLETE: successful

  • PARTIAL_COMPLETE: partially successful

  • FAILED: failed

COMPLETE

TableName

string

The name of the table in the Tablestore instance.

table1

TriggerMode

string

The trigger mode of the backup job.

MANUAL

UpdatedTime

integer

The time when the backup job was updated. The time is a UNIX timestamp. Unit: seconds.

1554347313

VaultId

string

The ID of the backup vault.

v-0006******q

Code

string

The return code. A value of 200 indicates success.

200

Message

string

The return message. "successful" is returned for successful requests, and an error message is returned for failed requests.

successful

PageNumber

integer

The page number. Pages start from 1. Default value: 1.

1

PageSize

integer

The number of entries per page. Minimum value: 1. Maximum value: 99. Default value: 10.

10

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: successful

  • false: failed

true

TotalCount

integer

The total number of backup jobs that meet the specified conditions.

8

Examples

Success response

JSON format

{
  "BackupJobs": {
    "BackupJob": [
      {
        "ActualBytes": 600,
        "ActualFiles": 8,
        "ActualItems": 6,
        "BackupType": "COMPLETE",
        "Bucket": "hbr-backup-oss",
        "BytesDone": 800,
        "BytesTotal": 1000,
        "ChangeListPath": "{\"dataSourceId\": \"ds-123456789\", \"path\": \"/changelist\"}",
        "ClientId": "c-*********************",
        "CompleteTime": 1554347313,
        "CreateTime": 1607436917,
        "CreatedTime": 1554347313,
        "CrossAccountRoleName": "BackupRole",
        "CrossAccountType": "SELF_ACCOUNT",
        "CrossAccountUserId": 0,
        "DestDataSourceDetail": "{\\\"prefix\\\":\\\"/\\\"}",
        "DestDataSourceId": "ds-000cov4ufudxklj24zdk",
        "DestSourceType": "OSS",
        "Detail": {
          "DestinationNativeSnapshotErrorMessage": "ECS.CreatingSnapshot",
          "DestinationNativeSnapshotId": "s-******************",
          "DestinationNativeSnapshotProgress": 85,
          "DestinationNativeSnapshotStatus": "COMPLETE",
          "DestinationRetention": 30,
          "DestinationSnapshotId": "s-******************",
          "DiskNativeSnapshotIdList": {
            "DiskNativeSnapshotId": [
              "s-******************"
            ]
          },
          "DoCopy": true,
          "InstanceInfos": {
            "i-xxxxxxxx": {
              "hostName": "test",
              "instanceName": "test",
              "instanceType": "ecs.c7.xlarge",
              "osType": "linux",
              "diskIds": [
                "d-xxxxxxxx01",
                "d-xxxxxxxx02"
              ],
              "osNameEn": "Rocky Linux 8.8 64 bit",
              "osName": "Rocky Linux 8.8 64-bit",
              "platform": "Rocky Linux"
            }
          },
          "NativeSnapshotId": "s-******************"
        },
        "ErrorMessage": "PARTIAL_COMPLETE",
        "Exclude": "[\"/var\", \"/proc\"]",
        "FileSystemId": "005494",
        "FilesDone": 9,
        "FilesTotal": 10,
        "Identifier": "c83**************************b76",
        "Include": "[\"/home/alice/*.pdf\", \"/home/bob/*.txt\"]",
        "InstanceId": "i-*********************",
        "InstanceName": "instancename",
        "ItemsDone": 8,
        "ItemsTotal": 10,
        "JobId": "job-000g********w7",
        "JobName": "jobname",
        "Options": "{\"UseVSS\":false}",
        "OtsDetail": {
          "TableNames": {
            "TableName": [
              "[\"table1\", \"table2\", \"table3\"]"
            ]
          }
        },
        "Paths": {
          "Path": [
            "\"/home\""
          ]
        },
        "PlanId": "plan-20********35",
        "Prefix": "example/",
        "Progress": 10000,
        "Report": {
          "FailedFiles": "/temp/report/158975xxxxxx4625/r-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_failed.zip",
          "ReportTaskStatus": "COMPLETE",
          "SkippedFiles": "/temp/report/158975xxxxxx4625/r-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_skipped.zip",
          "SuccessFiles": "/temp/report/158975xxxxxx4625/r-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_success.zip",
          "TotalFiles": "/temp/report/158975xxxxxx4625/job-0001hfxxxxxymsspjjtl/job-0001hfxxxxxymsspjjtl_total.csv"
        },
        "SourceType": "ECS_FILE",
        "Speed": 500,
        "SpeedLimit": "0:24:5120",
        "StartTime": 1554347313,
        "Status": "COMPLETE",
        "TableName": "table1",
        "TriggerMode": "MANUAL",
        "UpdatedTime": 1554347313,
        "VaultId": "v-0006******q"
      }
    ]
  },
  "Code": "200",
  "Message": "successful",
  "PageNumber": 1,
  "PageSize": 10,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Success": true,
  "TotalCount": 8
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.