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"
]
}
}
}
}