All Products
Search
Document Center

Hybrid Backup Recovery:DescribeBackupPlans

Last Updated:Nov 14, 2022

Queries one or more backup plans 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
ECS_FILE
FiltersarrayNo

The query filter.

objectNo

The query filter.

KeystringNo

The keys in the filter. Valid values:

  • regionId: the ID of a region
  • restoreId: the ID of a restore job
  • sourceType: the type of a data source
  • vaultId: the ID of a backup vault
  • targetInstanceId: the ID of an ECS instance
  • targetBucket: the name of an OSS bucket
  • targetFileSystemId: the ID of a file system
vaultId
ValuesarrayNo

The values that you want to match in the filter.

stringNo

The values that you want to match in the filter.

v-*********************

Response parameters

ParameterTypeDescriptionExample
object

The reponse body.

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 plans that meet the specified conditions.

8
BackupPlansarray

The returned backup plans that meet the specified conditions.

object

The returned backup plans that meet the specified conditions.

VaultIdstring

The ID of the backup vault.

v-*********************
BackupTypestring

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

COMPLETE
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.

1554347313
DataSourceIdstring

The ID of the data source.

ds-000ht6o9*****w61
SourceTypestring

The type of the data source. Valid values:

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

Indicates whether the backup plan is disabled. Valid values:

  • true: The backup plan is disabled.
  • false: The backup plan is enabled.
false
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.

oss-prefix
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.

{"UseVSS":false}
ClientIdstring

The ID of the client.

c-000ge4w*****1qb
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.

["/var", "/proc"]
Retentionlong

The retention period of backup data.

7
CreatedTimelong

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

1554347313
ClusterIdstring

The ID of the client group.

cl-000ht6o9******h
Bucketstring

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

hbr-backup-oss
Detailstring

The details about server backup.

{\"doCopy\":true,\"doBackup\":false,\"instanceName\":\"instance example\",\"appConsistent\":false,\"destinationRegionId\":\"cn-shanghai\",\"enableFsFreeze\":true,\"osNameEn\":\"Windows Server 2019 Datacenter Edition 64-bit Chinese Version\",\"osName\":\"Windows Server 2019 Datacenter Edition 64-bit Chinese Version\",\"diskIdList\":[],\"backupVaultId\":\"\",\"snapshotGroup\":true,\"destinationRetention\":35,\"platform\":\"Windows Server 2012\",\"timeoutInSeconds\":60,\"backupRetention\":1,\"osType\":\"windows\",\"preScriptPath\":\"\",\"postScriptPath\":\"\",\"enableWriters\":true,\"ecsDeleted\":false}
Schedulestring

The backup policy. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is completed. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day.

  • startTime: the time at which the system starts to run a backup job. The time follows the UNIX time format. Unit: seconds.
  • interval: the interval at which the system runs a backup job. The interval follows the ISO8601 standard. For example, PT1H indicates an interval of 1 hour. P1D indicates an interval of one day.
I|1602673264|P1D
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}. Separate multiple throttling rules with vertical bars (|). 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 ECS_FILE. This parameter indicates the ID of the ECS instance.

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

The ID of the backup plan.

plan-*********************
BackupSourceGroupIdstring

The ID of the data source group for backup.

System-Database
FileSystemIdstring

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

00594
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.

test2_HBR_RESTORED
InstanceNamestring

The name of the Tablestore instance.

instancename
UpdatedTimelong

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

1554347313
PlanNamestring

The name of the backup plan.

planname
Includestring

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the paths to the files that are backed up.

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

The list of backup policies. This parameter is returned only for disk backup.

object

The list of backup policies. This parameter is returned only for disk backup.

DestinationRetentionlong

The retention period of backup data.

90
Schedulestring

The backup policy. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is completed. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day.

  • startTime: the time at which the system starts to run a backup job. The time follows the UNIX time format. Unit: seconds.
  • interval: the interval at which the system runs a backup job. The interval follows the ISO8601 standard. For example, PT1H indicates an interval of 1 hour. P1D indicates an interval of one day.
I|1631685600|P1D
Retentionlong

The retention period of backup data.

90
Disabledboolean

Indicates whether the policy is disabled.

true
DoCopyboolean

Indicates whether the snapshot data is backed up to the backup vault.

false
DestinationRegionIdstring

The ID of the region where the remote backup vault resides.

cn-shanghai
RuleIdstring

The ID of the policy.

rule-0008i52rf0ulpni6kn6m
RuleNamestring

The name of the policy.

Disk Golden Rule
BackupTypestring

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

COMPLETE
Resourcesarray

The list of backup resources. This parameter is returned only for disk backup.

object
SourceTypestring

The type of the data source. Valid value: UDM_DISK.

UDM_DISK
ResourceIdstring

The ID of the data source.

d-j6cgioir6mi19jalulu4
Extrastring

Additional information about the data source.

{\"doBackup\":false,\"diskName\":\"Data disk\",\"size\":100,\"type\":\"data\",\"category\":\"cloud_essd\",\"imageId\":\"\",\"device\":\"/dev/xvdb\",\"encrypted\":false}
Pathsarray

This parameter is returned only if the SourceType parameter is set to ECS_FILE. This parameter indicates the backup paths.

string

This parameter indicates the backup paths.

["/home"]
TrialInfoobject

The free trial information.

TrialStartTimelong

The start time of the free trial.

1579413159
TrialVaultReleaseTimelong

The time when the free-trial repository is released.

1594965600
TrialExpireTimelong

The expiration time of the free trial.

1584597600
KeepAfterTrialExpirationboolean

Indicates whether you are billed based on the pay-as-you-go method after the free trial ends.

true
InstanceGroupIdstring

The ID of instance group.

i-**

Example

Request example

http(s)://[Endpoint]/?Action=DescribeBackupPlans
&PageNumber=1
&PageSize=10
&SourceType=ECS_FILE
&Filters=[{"Key":"vaultId","Values":["v-*********************"]}]
&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,
  "BackupPlans": [
    {
      "VaultId": "v-*********************",
      "BackupType": "COMPLETE",
      "CreateTime": 1554347313,
      "DataSourceId": "ds-000ht6o9*****w61",
      "SourceType": "ECS_FILE",
      "Disabled": true,
      "Prefix": "oss-prefix",
      "Options": "{\"UseVSS\":false}",
      "ClientId": "c-000ge4w*****1qb",
      "Exclude": "[\"/var\", \"/proc\"]\t",
      "Retention": 7,
      "CreatedTime": 1554347313,
      "ClusterId": "cl-000ht6o9******h",
      "Bucket": "hbr-backup-oss",
      "Detail": "{\\\"doCopy\\\":true,\\\"doBackup\\\":false,\\\"instanceName\\\":\\\"instance example\\\",\\\"appConsistent\\\":false,\\\"destinationRegionId\\\":\\\"cn-shanghai\\\",\\\"enableFsFreeze\\\":true,\\\"osNameEn\\\":\\\"Windows Server 2019 Datacenter Edition 64-bit Chinese Version\\\",\\\"osName\\\":\\\"Windows Server 2019 Datacenter Edition 64-bit Chinese Version\\\",\\\"diskIdList\\\":[],\\\"backupVaultId\\\":\\\"\\\",\\\"snapshotGroup\\\":true,\\\"destinationRetention\\\":35,\\\"platform\\\":\\\"Windows Server 2012\\\",\\\"timeoutInSeconds\\\":60,\\\"backupRetention\\\":1,\\\"osType\\\":\\\"windows\\\",\\\"preScriptPath\\\":\\\"\\\",\\\"postScriptPath\\\":\\\"\\\",\\\"enableWriters\\\":true,\\\"ecsDeleted\\\":false}",
      "Schedule": "I|1602673264|P1D",
      "SpeedLimit": "0:24:5120",
      "InstanceId": "i-*********************",
      "PlanId": "plan-*********************",
      "BackupSourceGroupId": "System-Database",
      "FileSystemId": "00594",
      "OtsDetail": {
        "TableNames": [
          "test2_HBR_RESTORED"
        ]
      },
      "InstanceName": "instancename",
      "UpdatedTime": 1554347313,
      "PlanName": "planname",
      "Include": "[\"/home/alice/*.pdf\", \"/home/bob/*.txt\"]",
      "Rules": [
        {
          "DestinationRetention": 90,
          "Schedule": "I|1631685600|P1D",
          "Retention": 90,
          "Disabled": true,
          "DoCopy": true,
          "DestinationRegionId": "cn-shanghai",
          "RuleId": "rule-0008i52rf0ulpni6kn6m",
          "RuleName": "Disk Golden Rule",
          "BackupType": "COMPLETE"
        }
      ],
      "Resources": [
        {
          "SourceType": "UDM_DISK",
          "ResourceId": "d-j6cgioir6mi19jalulu4",
          "Extra": "{\\\"doBackup\\\":false,\\\"diskName\\\":\\\"Data disk\\\",\\\"size\\\":100,\\\"type\\\":\\\"data\\\",\\\"category\\\":\\\"cloud_essd\\\",\\\"imageId\\\":\\\"\\\",\\\"device\\\":\\\"/dev/xvdb\\\",\\\"encrypted\\\":false}"
        }
      ],
      "Paths": [
        "[\"/home\"]"
      ],
      "TrialInfo": {
        "TrialStartTime": 1579413159,
        "TrialVaultReleaseTime": 1594965600,
        "TrialExpireTime": 1584597600,
        "KeepAfterTrialExpiration": true
      },
      "InstanceGroupId": "i-**"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperate
2022-02-21The response structure of the API operation has changed
Change itemChange content
Output ParametersThe response structure of the API operation has changed