UpdateBackupPlan

Updated at:

Updates a backup plan.

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:UpdateBackupPlan

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PlanId

string

Yes

The ID of the backup plan.

plan-20211***735

PlanName

string

No

The name of the backup plan.

planname

Schedule

string

No

The backup policy. Valid format: I|{startTime}|{interval}. This format specifies that a backup job is executed at an interval of {interval} starting from {startTime}. Backup jobs for past time are not compensated. If the previous backup job is not completed, the next backup job is not triggered. For example, I|1631685600|P1D specifies that a backup is performed every day starting from 2021-09-15 14:00:00.

  • startTime: The start time of the backup. The value is a UNIX timestamp in seconds.

  • interval: The ISO 8601 time interval. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.

I|1602673264|P1D

Retention

integer

No

The retention period of backups in days. The minimum value is 1.

7

Prefix

string

No

The backup prefix. This parameter is required only when SourceType is set to OSS. After this parameter is specified, only objects whose names match the prefix are backed up.

oss-prefix

VaultId

string

No

The ID of the backup vault.

v-0006******q

Detail

object

No

The details of the ECS instance backup. The value is a JSON string.

  • snapshotGroup: Specifies whether to use a consistent snapshot group. This is valid only when all cloud disks of the instance are ESSDs.

  • appConsistent: Specifies whether to use application consistency. This parameter must be used together with the preScriptPath and postScriptPath parameters.

  • preScriptPath: The path of the pre-freeze script.

  • postScriptPath: The path of the post-thaw script.

{\"EnableFsFreeze\":true,\"appConsistent\":false,\"postScriptPath\":\"\",\"preScriptPath\":\"\",\"snapshotGroup\":true,\"timeoutInSeconds\":60}

SourceType

string

No

The type of the data source. Valid values:

  • ECS_FILE: ECS files.

  • OSS: Alibaba Cloud OSS.

  • NAS: Alibaba Cloud NAS.

  • OTS: Alibaba Cloud Tablestore.

  • UDM_ECS: ECS instances.

ECS_FILE

SpeedLimit

string

No

The throttling for backup traffic. This parameter is required only when SourceType is set to ECS_FILE. Throttling helps you control the traffic of backup files during peak hours to prevent impacts on normal business. The format is {start}|{end}|{bandwidth}. Multiple throttling configurations are separated by vertical bars (|), and the configured time periods cannot overlap.

  • start: The start hour.

  • end: The end hour.

  • bandwidth: The bandwidth limit in KB/s.

0:24:5120

Include

string

No

The paths to be backed up. All files in the specified paths are backed up. This parameter is required only when SourceType is set to ECS_FILE. The value can be up to 255 characters in length.

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

Exclude

string

No

The paths to be excluded from backup. All files in the specified paths are not backed up. This parameter is required only when SourceType is set to ECS_FILE. The value can be up to 255 characters in length.

["/var", "/proc"]

Options

string

No

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

  • 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].

  • If you use VSS, you cannot back up multiple file folders at the same time.

{"UseVSS":false}

UpdatePaths

boolean

No

Specifies whether to update the source paths when the source paths are empty. Valid values:

  • true: updates the source paths based on the paths defined in this operation.

  • false: does not update the source paths. The backup continues based on the paths specified when the backup plan was created.

false

Path

array

No

The backup path.

string

No

The source path. The value can be up to 65,536 characters in length. The source path must meet the following rules:

  • If no wildcard (*) is used, you can enter up to 20 lines of paths.

  • If a wildcard (*) is used, you can enter only one line of path. Wildcards such as /*/* are supported.

  • Only absolute paths are supported in each line.

  • If VSS is used, multiple paths, UNC paths, wildcards, and excluded files are not supported.

  • If UNC is used, VSS, wildcards, and excluded files are not supported. If the backup source contains a UNC path, Windows ACLs are not backed up.

["/home"]

Rule

array<object>

No

The rules of the backup plan.

object

No

DestinationRetention

integer

No

The retention period of geo-redundant backups in days.

7

Schedule

string

No

The backup policy. Valid format: I|{startTime}|{interval}. This format specifies that a backup job is executed at an interval of {interval} starting from {startTime}. Backup jobs for past time are not executed. If the previous backup job is not completed, the next backup job is not triggered. For example, I|1631685600|P1D specifies that a backup is performed every day starting from 2021-09-15 14:00:00.

startTime: The start time of the backup. The value is a UNIX timestamp in seconds. interval: The ISO 8601 time interval. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.

I|1631685600|P1D

Disabled

boolean

No

Specifies whether the policy is disabled.

false

Retention

integer

No

The retention period of backups in days. The minimum value is 1.

7

DoCopy

boolean

No

Specifies whether to enable cross-region replication.

false

DestinationRegionId

string

No

The ID of the destination region for geo-redundant backups.

cn-shanghai

RuleName

string

No

The policy name.

rule-test-name

BackupType

string

No

The backup type. Valid value: COMPLETE, which specifies a full backup.

COMPLETE

OtsDetail OtsDetail

No

The details of the Tablestore instance.

KeepLatestSnapshots

integer

No

Specifies whether to retain at least one backup version. Valid values:

  • 0: does not retain.

  • 1: retains.

1

ChangeListPath

string

No

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

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

Edition

string

No

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

STANDARD

Response elements

Element

Type

Description

Example

object

Code

string

The HTTP status code. A value of 200 indicates that the request is successful.

200

Message

string

The returned message. If the request is successful, "successful" is returned. If an error occurs, the corresponding error message is returned.

successful

RequestId

string

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

true

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.