ALIYUN::HBR::EcsBackupPlan类型用于创建ECS 文件备份计划。
语法
{
"Type": "ALIYUN::HBR::EcsBackupPlan",
"Properties": {
"BackupType": String,
"InstanceId": String,
"PlanName": String,
"Retention": Integer,
"Schedule": String,
"VaultId": String,
"CrossAccountUserId": String,
"CrossAccountRoleName": String,
"CrossAccountType": String,
"Disabled": Boolean,
"Detail": Map,
"Exclude": String,
"Include": String,
"Options": Map,
"Paths": List,
"SpeedLimit": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
BackupType |
String |
是 |
否 |
备份类型。 |
有效值:COMPLETE |
|
InstanceId |
String |
是 |
否 |
ECS实例的ID。 |
主机上必须已安装ECS备份客户端。 |
|
PlanName |
String |
是 |
是 |
备份计划的名称。 |
1~64个字符,单个仓库中每种数据源类型的备份计划名称必须唯一。 |
|
Retention |
Integer |
是 |
是 |
备份保留天数, |
最小值为1。 |
|
Schedule |
String |
是 |
是 |
备份策略。 |
可选格式:
|
|
VaultId |
String |
是 |
是 |
备份仓库的ID。 |
无 |
|
CrossAccountRoleName |
String |
否 |
否 |
当前账号管理的跨账号在原账号RAM备份中创建的角色名称。 |
无 |
|
CrossAccountType |
String |
否 |
否 |
跨账号备份的类型。 |
取值:
|
|
CrossAccountUserId |
String |
否 |
否 |
当前账号管理的跨账号备份的原账号ID。 |
无 |
|
Detail |
Map |
否 |
是 |
备份计划的详细信息。 |
无 |
|
Disabled |
Boolean |
否 |
否 |
是否禁用备份任务。 |
无 |
|
Exclude |
String |
否 |
是 |
备份计划的排除路径。 |
最大长度:255 |
|
Include |
String |
否 |
是 |
备份计划的包含路径。 |
最大长度:255 |
|
Options |
Map |
否 |
是 |
Windows操作系统使用VSS实现应用一致性, |
例如:{"UseVSS":false}。 |
|
Paths |
List |
否 |
是 |
备份计划的路径。 |
最大长度:20 |
|
SpeedLimit |
String |
否 |
是 |
备份计划的限速。 |
无 |
返回值
Fn::GetAtt
PlanId:备份计划的ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Options:
Type: Json
Description:
en: 'Windows operating system with application consistency using VSS, e.g: {"UseVSS":false}.'
Required: false
CrossAccountUserId:
Type: String
Description:
en: The original account ID of the cross account backup managed by the current account.
Required: false
Exclude:
Type: String
Description:
en: The exclude paths of the backup plan.
Required: false
MaxLength: 255
InstanceId:
Type: String
Description:
en: The ID of ECS instance. The ecs backup client must have been installed on the host.
Required: true
SpeedLimit:
Type: String
Description:
en: The speed limit of the backup plan.
Required: false
CrossAccountRoleName:
Type: String
Description:
en: The role name created in the original account RAM backup by the cross account managed by the current account.
Required: false
CrossAccountType:
Type: String
Description:
en: 'The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.'
AllowedValues:
- SELF_ACCOUNT
- CROSS_ACCOUNT
Required: false
Include:
Type: String
Description:
en: The include paths of the backup plan.
Required: false
MaxLength: 255
PlanName:
Type: String
Description:
en: The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
Required: true
MinLength: 1
MaxLength: 64
VaultId:
Type: String
Description:
en: The ID of backup vault.
Required: true
Retention:
Type: Number
Description:
en: Backup retention days, the minimum is 1.
Required: true
MinValue: 1
Schedule:
Type: String
Description:
en: 'Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.'
Required: true
BackupType:
Type: String
Description:
en: 'Backup type. Valid values: COMPLETE.'
AllowedValues:
- COMPLETE
Required: true
Paths:
AssociationPropertyMetadata:
Parameter:
Type: String
Required: false
Type: Json
AssociationProperty: List[Parameter]
Description:
en: The paths of the backup plan.
Required: false
MaxLength: 20
Disabled:
Type: Boolean
Description:
en: 'Whether to disable the backup task. Valid values: true, false.'
Required: false
Detail:
Type: Json
Description:
en: The detail of the backup plan.
Required: false
Resources:
EcsBackupPlan:
Type: ALIYUN::HBR::EcsBackupPlan
Properties:
Options:
Ref: Options
CrossAccountUserId:
Ref: CrossAccountUserId
Exclude:
Ref: Exclude
InstanceId:
Ref: InstanceId
SpeedLimit:
Ref: SpeedLimit
CrossAccountRoleName:
Ref: CrossAccountRoleName
CrossAccountType:
Ref: CrossAccountType
Include:
Ref: Include
PlanName:
Ref: PlanName
VaultId:
Ref: VaultId
Retention:
Ref: Retention
Schedule:
Ref: Schedule
BackupType:
Ref: BackupType
Paths:
Ref: Paths
Disabled:
Ref: Disabled
Detail:
Ref: Detail
Outputs:
PlanId:
Description: The ID of the backup plan.
Value:
Fn::GetAtt:
- EcsBackupPlan
- PlanId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Options": {
"Type": "Json",
"Description": {
"en": "Windows operating system with application consistency using VSS, e.g: {\"UseVSS\":false}."
},
"Required": false
},
"CrossAccountUserId": {
"Type": "String",
"Description": {
"en": "The original account ID of the cross account backup managed by the current account."
},
"Required": false
},
"Exclude": {
"Type": "String",
"Description": {
"en": "The exclude paths of the backup plan."
},
"Required": false,
"MaxLength": 255
},
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of ECS instance. The ecs backup client must have been installed on the host."
},
"Required": true
},
"SpeedLimit": {
"Type": "String",
"Description": {
"en": "The speed limit of the backup plan."
},
"Required": false
},
"CrossAccountRoleName": {
"Type": "String",
"Description": {
"en": "The role name created in the original account RAM backup by the cross account managed by the current account."
},
"Required": false
},
"CrossAccountType": {
"Type": "String",
"Description": {
"en": "The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT."
},
"AllowedValues": [
"SELF_ACCOUNT",
"CROSS_ACCOUNT"
],
"Required": false
},
"Include": {
"Type": "String",
"Description": {
"en": "The include paths of the backup plan."
},
"Required": false,
"MaxLength": 255
},
"PlanName": {
"Type": "String",
"Description": {
"en": "The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique."
},
"Required": true,
"MinLength": 1,
"MaxLength": 64
},
"VaultId": {
"Type": "String",
"Description": {
"en": "The ID of backup vault."
},
"Required": true
},
"Retention": {
"Type": "Number",
"Description": {
"en": "Backup retention days, the minimum is 1."
},
"Required": true,
"MinValue": 1
},
"Schedule": {
"Type": "String",
"Description": {
"en": "Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered."
},
"Required": true
},
"BackupType": {
"Type": "String",
"Description": {
"en": "Backup type. Valid values: COMPLETE."
},
"AllowedValues": [
"COMPLETE"
],
"Required": true
},
"Paths": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Required": false
}
},
"Type": "Json",
"AssociationProperty": "List[Parameter]",
"Description": {
"en": "The paths of the backup plan."
},
"Required": false,
"MaxLength": 20
},
"Disabled": {
"Type": "Boolean",
"Description": {
"en": "Whether to disable the backup task. Valid values: true, false."
},
"Required": false
},
"Detail": {
"Type": "Json",
"Description": {
"en": "The detail of the backup plan."
},
"Required": false
}
},
"Resources": {
"EcsBackupPlan": {
"Type": "ALIYUN::HBR::EcsBackupPlan",
"Properties": {
"Options": {
"Ref": "Options"
},
"CrossAccountUserId": {
"Ref": "CrossAccountUserId"
},
"Exclude": {
"Ref": "Exclude"
},
"InstanceId": {
"Ref": "InstanceId"
},
"SpeedLimit": {
"Ref": "SpeedLimit"
},
"CrossAccountRoleName": {
"Ref": "CrossAccountRoleName"
},
"CrossAccountType": {
"Ref": "CrossAccountType"
},
"Include": {
"Ref": "Include"
},
"PlanName": {
"Ref": "PlanName"
},
"VaultId": {
"Ref": "VaultId"
},
"Retention": {
"Ref": "Retention"
},
"Schedule": {
"Ref": "Schedule"
},
"BackupType": {
"Ref": "BackupType"
},
"Paths": {
"Ref": "Paths"
},
"Disabled": {
"Ref": "Disabled"
},
"Detail": {
"Ref": "Detail"
}
}
}
},
"Outputs": {
"PlanId": {
"Description": "The ID of the backup plan.",
"Value": {
"Fn::GetAtt": [
"EcsBackupPlan",
"PlanId"
]
}
}
}
}