ALIYUN::HBR::DbPlan类型用于创建备份计划。
语法
{
"Type": "ALIYUN::HBR::DbPlan",
"Properties": {
"Options": String,
"InstanceUuid": String,
"SourceType": String,
"VaultId": String,
"Source": Map,
"ContinuousPlan": String,
"IncPlan": String,
"MaxRetrySeconds": Integer,
"HostUuid": String,
"CumulativePlan": String,
"FullPlan": String,
"LogPlan": String,
"MaxRateLimit": Integer,
"DbPlanName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Options | String | 否 | 否 | 备份选项。 | 取值为JSON格式的字符串,且不同数据源类型(SourceType)对应的取值不同。
|
InstanceUuid | String | 否 | 否 | 数据库实例UUID。 | 无 |
SourceType | String | 是 | 是 | 数据源类型。 | 取值:
|
VaultId | String | 是 | 否 | 仓库ID。 | 无 |
Source | Map | 否 | 否 | 将要备份的数据库实例。 | 更多信息,请参见Source语法和Source属性。 |
ContinuousPlan | String | 否 | 是 | 连续日志备份计划。 | 取值:{"type": "continuous"} 。
|
IncPlan | String | 否 | 是 | 增量备份计划。 |
仅适用于MYSQL和
说明
|
MaxRetrySeconds | Integer | 否 | 是 | 断线重连时间。 | 备份时,断开数据库后重新连接的时间间隔。默认为600秒。 |
HostUuid | String | 是 | 否 | 客户端主机UUID。 | 无 |
CumulativePlan | String | 否 | 是 | 累计增量备份计划。 |
仅适用于MSSQL类型的数据源。 取值为JSON格式的字符串,具体示例如下:
说明
|
FullPlan | String | 否 | 是 | 完全备份计划。 | 取值为JSON格式的字符串,具体示例如下:
说明
|
LogPlan | String | 否 | 是 | 日志备份计划。 | 取值为JSON格式的字符串,具体示例如下:
说明
|
MaxRateLimit | Integer | 否 | 是 | 速度限制。 | 默认为0,表示不限速。 |
DbPlanName | String | 是 | 是 | 备份计划的名称。 | 无 |
Source语法
"Source": {
"Entries": List
}
Source属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Entries | List | 否 | 否 | 备份源。 | 取值:
|
返回值
Fn::GetAtt
- Options:JSON格式的备份选项。
- InstanceUuid:数据库实例ID
- CumulativeUuid:增量计划ID。
- SourceType:数据库类型。
- PlanId:计划ID。
- LogUuid:日志ID。
- VaultId:仓库ID。
- IncUuid:增量备份计划ID。
- ContinuousPlan:连续日志备份计划。
- IncPlan:增量备份计划。
- MaxRetrySeconds:断线重连时间。
- Target:要备份的目标。
- HostUuid:客户端主机UUID。
- ContinuousUuid:连续日志备份UUID。
- CumulativePlan:累计增量备份计划。
- FullPlan:完全备份计划。
- LogPlan:日志备份计划。
- MaxRateLimit:速度限制。
- FullUuid:完全备份计划UUID。
- DbPlanName:备份计划的名称。
示例
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Options": {
"Type": "String",
"Description": "Backup options in json format, different for each type of database. For Oracle, use {\"channels\":4,\"compression\":\"lzop\",\"offline_backup\":false,\"archivelog_reserve_hours\":24,\"custom_commands\":\"\"}, \"channels\" means numbers of concurrent theads, \"archivelog_reserve_hours\" means how long before the archive log will be deleted after backup job completed, other paramters should use the default value. For Mysql, use {\"channels\":4,\"compression\":\"lzop\",\"del_binlog\":false}, \"del_binlog\" means whether the binlog will be deleted after backup completed, only take effect for log or continuous backup. For SQL Server, use {\\\"channels\\\":4,\\\"verify\\\":false,\\\"compression\\\":\\\"lzop\\\",\\\"backup_new_databases\\\":false}.",
"Default": "{\"channels\":4,\"compression\":\"lzop\",\"del_binlog\":false}"
},
"InstanceUuid": {
"Type": "String",
"Description": "Uuid of database instance.",
"Default": "d12729b82116154****"
},
"SourceType": {
"Type": "String",
"Description": "Database type, allowed value: MYSQL, ORACLE, MSSQL",
"Default": "MYSQL"
},
"VaultId": {
"Type": "String",
"Description": "Vault ID to create backup plan, the backup data will be stored to the vault.",
"Default": "v-df****"
},
"Source": {
"Type": "Json",
"Description": "Which database instance or database will be backup.",
"Default": "{\n \"Entries\": [\n \"mysql://MYSQL-3306\"\n ]\n}"
},
"ContinuousPlan": {
"Type": "String",
"Description": "Continuous backup plan schedule. Use { \"type\": \"continuous\" }.",
"Default": "continuous"
},
"IncPlan": {
"Type": "String",
"Description": "Incremental backup plan schedule. Only for mysql and oracle. More details see FullPlan.",
"Default": "{\n \"interval\": 1,\n \"start\": \"00:00:00\",\n \"type\": \"daily\"\n }"
},
"MaxRetrySeconds": {
"Type": "Number",
"Description": "Max retry seconds on network failure.",
"Default": "600"
},
"HostUuid": {
"Type": "String",
"Description": "Uuid of the host of the database instance.",
"Default": "701781640b3afc****"
},
"FullPlan": {
"Type": "String",
"Description": "Full backup plan schedule. daily: {\"type\": \"daily\", \"start\": \"00:00:00\", \"interval\": 3}, weekly {\"type\":\"weekly\",\"start\": \"03:00:00\",\"days\": [1,2,3,4,5],\"interval\": 1}, days can be 0 - 6, 0 means Sunday, and interval can be 1 - 52.",
"Default": "{\n \"days\": [\n 6\n ],\n \"interval\": 1,\n \"start\": \"18:00:00\",\n \"type\": \"weekly\"\n }"
},
"DbPlanName": {
"Type": "String",
"Description": "Display name of the backup plan.",
"Default": "test"
}
},
"Resources": {
"HBRDbPlan": {
"Type": "ALIYUN::HBR::DbPlan",
"Properties": {
"Options": {
"Ref": "Options"
},
"InstanceUuid": {
"Ref": "InstanceUuid"
},
"SourceType": {
"Ref": "SourceType"
},
"VaultId": {
"Ref": "VaultId"
},
"Source": {
"Ref": "Source"
},
"ContinuousPlan": {
"Ref": "ContinuousPlan"
},
"IncPlan": {
"Ref": "IncPlan"
},
"MaxRetrySeconds": {
"Ref": "MaxRetrySeconds"
},
"HostUuid": {
"Ref": "HostUuid"
},
"FullPlan": {
"Ref": "FullPlan"
},
"DbPlanName": {
"Ref": "DbPlanName"
}
}
}
},
"Outputs": {
"Options": {
"Description": "Backup options in json format, different for each type of database. For Oracle, use {\"channels\":4,\"compression\":\"lzop\",\"offline_backup\":false,\"archivelog_reserve_hours\":24,\"custom_commands\":\"\"}, \"channels\" means numbers of concurrent theads, \"archivelog_reserve_hours\" means how long before the archive log will be deleted after backup job completed, other paramters should use the default value. For Mysql, use {\"channels\":4,\"compression\":\"lzop\",\"del_binlog\":false}, \"del_binlog\" means whether the binlog will be deleted after backup completed, only take effect for log or continuous backup. For SQL Server, use {\\\"channels\\\":4,\\\"verify\\\":false,\\\"compression\\\":\\\"lzop\\\",\\\"backup_new_databases\\\":false}.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"Options"
]
}
},
"InstanceUuid": {
"Description": "Uuid of database instance.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"InstanceUuid"
]
}
},
"CumulativeUuid": {
"Description": "Uuid of cumulative plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"CumulativeUuid"
]
}
},
"SourceType": {
"Description": "Database type, allowed value: MYSQL, ORACLE, MSSQL",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"SourceType"
]
}
},
"PlanId": {
"Description": "Id of the backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"PlanId"
]
}
},
"LogUuid": {
"Description": "Uuid of the log backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"LogUuid"
]
}
},
"VaultId": {
"Description": "Vault ID to create backup plan, the backup data will be stored to the vault.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"VaultId"
]
}
},
"IncUuid": {
"Description": "Uuid of the incremental bakcup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"IncUuid"
]
}
},
"ContinuousPlan": {
"Description": "Continuous backup plan schedule. Use { \"type\": \"continuous\" }.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"ContinuousPlan"
]
}
},
"IncPlan": {
"Description": "Incremental backup plan schedule. Only for mysql and oracle. More details see FullPlan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"IncPlan"
]
}
},
"MaxRetrySeconds": {
"Description": "Max retry seconds on network failure.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"MaxRetrySeconds"
]
}
},
"Target": {
"Description": "Target vault to backup.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"Target"
]
}
},
"HostUuid": {
"Description": "Uuid of the host of the database instance.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"HostUuid"
]
}
},
"ContinuousUuid": {
"Description": "Uuid of continuous backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"ContinuousUuid"
]
}
},
"CumulativePlan": {
"Description": "Cumulative plan schedule, only for mssql. More details see FullPlan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"CumulativePlan"
]
}
},
"FullPlan": {
"Description": "Full backup plan schedule. daily: {\"type\": \"daily\", \"start\": \"00:00:00\", \"interval\": 3}, weekly {\"type\":\"weekly\",\"start\": \"03:00:00\",\"days\": [1,2,3,4,5],\"interval\": 1}, days can be 0 - 6, 0 means Sunday, and interval can be 1 - 52.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"FullPlan"
]
}
},
"LogPlan": {
"Description": "Log backup plan schedule.More details see FullPlan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"LogPlan"
]
}
},
"MaxRateLimit": {
"Description": "Max rate limit for backup job,",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"MaxRateLimit"
]
}
},
"FullUuid": {
"Description": "Uuid of full backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"FullUuid"
]
}
},
"DbPlanName": {
"Description": "Display name of the backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"DbPlanName"
]
}
}
}
}