All Products
Search
Document Center

Hybrid Backup Recovery:DescribeBackupJobs2

Last Updated:Nov 14, 2022

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The number of the page to return. Pages start from page 1. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Valid values: 1 to 99. Default value: 10.

10
SourceTypestringYes

The type of the data source. Valid values:

  • ECS_FILE: Elastic Compute Service (ECS) files
  • OSS: Object Storage Service (OSS) buckets
  • NAS: Apsara File Storage NAS file systems
  • OTS: Tablestore instances
  • UDM_ECS: ECS instances
  • UDM_ECS_DISK: ECS disks
ECS_FILE
SortDirectionstringNo

The order in which you want to sort the results. Valid values:

  • ASCEND: sorts the results in ascending order
  • DESCEND (default value): sorts the results in descending order
DESCEND
FiltersarrayNo

The key-value of the query filter.

objectNo
KeystringNo

The keys in the filter. Valid values:

  • RegionId: the ID of a region
  • PlanId: the ID of a backup plan
  • JobId: the ID of a backup job
  • VaultId: the ID of a backup vault
  • InstanceId: the ID of an ECS instance
  • Bucket: the name of an OSS bucket
  • FileSystemId: the ID of a file system
  • Status: the status of a backup job
  • CreatedTime: the start time of a backup job
  • CompleteTime: the end time of a backup job
  • instanceName: the name of a Tablestore instance
VaultId
ValuesarrayNo
stringNo

The values that you want to match in the filter.

["v-*********************"]
OperatorstringNo

The matching method. Default value: IN. This parameter specifies the operator that you want to use to match a key and a 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: specifies a JSON array as a range. The results must fall within the range in the [Minimum value,maximum value] format.
  • IN: specifies an array as a collection. The results must fall within the collection.

**

Note If you specify CompleteTime as a key to query backup jobs, you cannot use the IN operator to perform a match.

IN

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
Successboolean

Indicates whether the call is successful.

  • true: The call is successful.
  • false: The call fails.
true
Codestring

The HTTP status code. The status code 200 indicates that the call is successful.

200
Messagestring

The message that is returned. If the call is successful, "successful" is returned. If the call fails, an error message is returned.

successful
PageNumberinteger

The page number of the returned page. Pages start from page 1. Default value: 1.

1
PageSizeinteger

The number of entries returned per page. Valid values: 1 to 99. Default value: 10.

10
TotalCountlong

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

8
BackupJobsarray

The returned backup jobs that meet the specified conditions.

object
Statusstring

The status of the backup job. Valid values:

  • COMPLETE: The backup job is completed.
  • PARTIAL_COMPLETE: The backup job is partially completed.
  • FAILED: The restore job has failed.
COMPLETE
ErrorMessagestring

The error message that is returned for the backup job.

PARTIAL_COMPLETE
ActualItemslong

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the actual number of objects that are backed up by the backup job.

6
VaultIdstring

The ID of the backup vault.

v-0006******q
ActualByteslong

The actual amount of data that is backed up after duplicates are removed. Unit: bytes.

600
CreateTimelong

This parameter is returned only if the SourceType parameter is set to NAS. This parameter indicates the time when the file system was created. This value is a UNIX timestamp. Unit: seconds.

1607436917
BackupTypestring

The backup type. Valid value: COMPLETE, which indicates full backup.

COMPLETE
Prefixstring

This parameter is returned only if the SourceType parameter is set to OSS. This parameter indicates the prefix of objects that are backed up.

example/
SourceTypestring

The type of the data source. Valid values:

  • ECS_FILE: ECS files
  • OSS: OSS buckets
  • NAS: NAS file systems
ECS_FILE
Optionsstring

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates whether Windows VSS is used to define a backup path.

  • This parameter is available only for Windows ECS instances.
  • If data changes occur in the backup source, the source data must be the same as the data to be backed up before the system sets this parameter to ["UseVSS":true].
  • If you use VSS, you cannot back up data from multiple directories.
{"UseVSS":false}
ClientIdstring

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the ID of the backup client.

c-*********************
ItemsDonelong

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the number of objects that are backed up.

8
BytesTotallong

The total amount of data that is backed up from the data source. Unit: bytes.

1000
Excludestring

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the paths to the files that are excluded from the backup job. The value must be 1 to 255 characters in length.

["/var", "/proc"]
JobNamestring

The name of the backup job.

jobname
CompleteTimelong

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

1554347313
CreatedTimelong

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

1554347313
Bucketstring

This parameter is returned only if the SourceType parameter is set to OSS. This parameter indicates the name of the OSS bucket that is backed up.

hbr-backup-oss
Progressinteger

The backup progress. For example, 10000 indicates that the progress is 100%.

10000
SpeedLimitstring

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the throttling rules. Format: {start}{end}{bandwidth}. Multiple throttling rules are separated with vertical bars ({start}|{end}|{bandwidth}). A specified time range cannot overlap with another one.

  • start: the start hour
  • end: the end hour
  • bandwidth: the bandwidth. Unit: KB/s.
0:24:5120
InstanceIdstring

This parameter is returned only if the SourceType parameter is set to NAS. This parameter indicates the ID of the ECS instance.

i-*********************
PlanIdstring

The ID of the backup plan.

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

This parameter is returned only if the SourceType parameter is set to NAS. This parameter indicates the ID of the NAS file system.

005494
StartTimelong

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

1554347313
UpdatedTimelong

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

1554347313
JobIdstring

The ID of the backup job.

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

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the total number of objects in the data source.

10
Includestring

The paths to the files that are included in the backup job.

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

The actual amount of data that is generated by incremental backups. Unit: bytes.

800
Pathsarray

The backup paths.

string

The backup paths.

"/home"
InstanceNamestring

The name of the Tablestore instance.

instancename
OtsDetailobject

The details about the Tablestore instance.

TableNamesarray

The names of the destination tables in the Tablestore instance.

string

The names of the destination tables in the Tablestore instance.

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

The average speed at which data is backed up. Unit: KB/s.

500
TableNamestring

The name of a destination table in the Tablestore instance.

table1

Example

Request example

http(s)://[Endpoint]/?Action=DescribeBackupJobs2
&PageNumber=1
&PageSize=10
&SourceType=ECS_FILE
&SortDirection=DESCEND
&Filters=[{"Key":"VaultId","Values":["[\"v-*********************\"]"],"Operator":"IN"}]
&Common request parameters

Normal return example

JSONFormat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 8,
  "BackupJobs": [
    {
      "Status": "COMPLETE",
      "ErrorMessage": "PARTIAL_COMPLETE",
      "ActualItems": 6,
      "VaultId": "v-0006******q",
      "ActualBytes": 600,
      "CreateTime": 1607436917,
      "BackupType": "COMPLETE",
      "Prefix": "example/",
      "SourceType": "ECS_FILE",
      "Options": "{\"UseVSS\":false}",
      "ClientId": "c-*********************",
      "ItemsDone": 8,
      "BytesTotal": 1000,
      "Exclude": "[\"/var\", \"/proc\"]",
      "JobName": "jobname",
      "CompleteTime": 1554347313,
      "CreatedTime": 1554347313,
      "Bucket": "hbr-backup-oss",
      "Progress": 10000,
      "SpeedLimit": "0:24:5120",
      "InstanceId": "i-*********************",
      "PlanId": "plan-20********35",
      "FileSystemId": "005494",
      "StartTime": 1554347313,
      "UpdatedTime": 1554347313,
      "JobId": "job-000g********w7",
      "ItemsTotal": 10,
      "Include": "[\"/home/alice/*.pdf\", \"/home/bob/*.txt\"]",
      "BytesDone": 800,
      "Paths": [
        "\"/home\""
      ],
      "InstanceName": "instancename",
      "OtsDetail": {
        "TableNames": [
          "[\"table1\", \"table2\", \"table3\"]"
        ]
      },
      "Speed": 500,
      "TableName": "table1"
    }
  ]
}

Error codes

For a list of error codes, visit the API error center.