All Products
Search
Document Center

Cloud Backup:UpdateBackupPlan

Last Updated:Nov 06, 2024

Updates a backup plan.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
hbr:UpdateBackupPlanupdate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PlanIdstringYes

The ID of the backup plan.

plan-20211***735
PlanNamestringNo

The name of the backup plan.

planname
SchedulestringNo

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 must follow the UNIX time format. Unit: seconds.
  • interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
I|1602673264|P1D
RetentionlongYes

The retention period of the backup data. Minimum value: 1. Unit: days.

7
PrefixstringNo

This parameter is required only if the SourceType parameter is set to OSS. This parameter specifies the prefix of objects that you want to back up. After a prefix is specified, only objects whose names start with the prefix are backed up.

oss-prefix
VaultIdstringYes

The ID of the backup vault.

v-0006******q
DetailobjectNo

The details about ECS instance backup. The value is a JSON string.

  • snapshotGroup: specifies whether to use a snapshot-consistent group. This parameter is valid only if all disks of the ECS instance are enhanced SSDs (ESSDs).
  • appConsistent: specifies whether to enable application consistency. If you set this parameter to true, you must also specify the preScriptPath and postScriptPath parameters.
  • preScriptPath: the path to the pre-freeze scripts.
  • postScriptPath: the path to the post-thaw scripts.
{\"EnableFsFreeze\":true,\"appConsistent\":false,\"postScriptPath\":\"\",\"preScriptPath\":\"\",\"snapshotGroup\":true,\"timeoutInSeconds\":60}
SourceTypestringNo

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
ECS_FILE
SpeedLimitstringNo

This parameter is required only if the SourceType parameter is set to ECS_FILE. This parameter specifies the throttling rules. To ensure business continuity, you can limit the bandwidth that is used for file backup during peak hours. Format: {start}|{end}|{bandwidth}. Separate multiple throttling rules with vertical bars (|). A specified time range cannot overlap with another time range.

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

This parameter is required only if the SourceType parameter is set to ECS_FILE. This parameter specifies the paths to the files that you want to back up. The value must be 1 to 255 characters in length.

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

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

["/var", "/proc"]
OptionsstringNo

This parameter is required only if the SourceType parameter is set to ECS_FILE. This parameter specifies whether to use Windows Volume Shadow Copy Service (VSS) to define a source 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 you can set this parameter to ["UseVSS":true].
  • If you use VSS, you cannot back up data from multiple directories.
{"UseVSS":false}
UpdatePathsbooleanNo

Specifies whether to update the source path if the backup source is empty. Valid values:

  • true: The system replaces the original source path with the specified source path.
  • false: The system does not update the original source path. The system backs up data based on the source path that you specified when you created the backup plan.
false
PatharrayNo

The source paths.

stringNo

The source paths. The value must be 1 to 65,536 characters in length. You must specify source paths based on the following rules:

  • If you do not use wildcards (*), you can enter up to 20 source paths.
  • If you use wildcards (*), you can enter only one path. You must specify the path in the /*/* format.
  • Only absolute paths are supported.
  • If you use VSS, you can enter only one path. UNC paths and wildcards (*) are not supported. You cannot exclude files from the backup plan.
  • If you use UNC, VSS paths and wildcards (*) are not supported. You cannot exclude files from the backup plan. If a UNC path is specified, HBR does not back up the access control list (ACL) of Windows.
["/home"]
Rulearray<object>No

The rule of the backup plan.

objectNo
DestinationRetentionlongNo

The retention period of the backup data. Unit: days.

7
SchedulestringNo

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 must follow the UNIX time format. Unit: seconds. interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.

I|1631685600|P1D
DisabledbooleanNo

Specifies whether to disable the policy.

false
RetentionlongNo

The retention period of the backup data. Minimum value: 1. Unit: days.

7
DoCopybooleanNo

Specifies whether to enable remote replication.

false
DestinationRegionIdstringNo

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

cn-shanghai
RuleNamestringNo

The name of the backup policy.

rule-test-name
BackupTypestringNo

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

COMPLETE
OtsDetailOtsDetailNo

The details about the Tablestore instance.

KeepLatestSnapshotslongNo

Specifies whether to enable the feature of keeping at least one backup version. Valid values:

  • 0: The feature is disabled.
  • 1: The feature is enabled.
1
ChangeListPathstringNo

The configurations of the incremental file synchronization. This parameter is required for data synchronization only.

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

Response parameters

ParameterTypeDescriptionExample
object
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
RequestIdstring

The ID of the request.

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

Indicates whether the call is successful. Valid values:

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

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history