Creates a database backup plan.
Syntax
{
"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
}
}
Properties
| Property | Type | Required | Update Allowed | Description | Constraints |
| Options | String | No | No | The backup options. | The value is a JSON string that varies based on SourceType.
|
| InstanceUuid | String | No | No | The UUID of the database instance. | None |
| SourceType | String | Yes | Yes | The type of the data source. | Valid values:
|
| VaultId | String | Yes | No | Repository ID | None |
| Source | Map | No | No | The database instance to back up. | For more information, see Source syntax and Source properties. |
| ContinuousPlan | String | No | Yes | The continuous log backup schedule. | Value: {"type": "continuous"}. |
| IncPlan | String | No | Yes | The incremental backup schedule. |
This parameter is valid only for MYSQL and
Note
|
| MaxRetrySeconds | Integer | No | Yes | The reconnection timeout period. | Seconds to wait before reconnecting to the database after a disconnection during backup. Default value: 600. |
| HostUuid | String | Yes | No | The UUID of the client host. | None |
| CumulativePlan | String | No | Yes | The cumulative incremental backup schedule. |
This parameter is valid only for MSSQL data sources. The value is a JSON string. Examples:
Note
|
| FullPlan | String | No | Yes | The full backup schedule. | The value is a JSON string. Examples:
Note
|
| LogPlan | String | No | Yes | The log backup schedule. | The value is a JSON string. Examples:
Note
|
| MaxRateLimit | Integer | No | Yes | The speed limit. | Default value: 0, which indicates no speed limit. |
| DbPlanName | String | Yes | Yes | The name of the backup plan. | None |
Source syntax
"Source": {
"Entries": List
}
Source properties
| Property | Type | Required | Update Allowed | Description | Constraints |
| Entries | List | No | No | The backup source. | Valid values:
|
Return values
Fn::GetAtt
- Options: Backup options in JSON format.
- InstanceUuid: UUID of the database instance.
- CumulativeUuid: UUID of the cumulative plan.
- SourceType: Type of the database.
- PlanId: ID of the backup plan.
- LogUuid: UUID of the log backup plan.
- VaultId: ID of the backup repository.
- IncUuid: UUID of the incremental backup plan.
- ContinuousPlan: Continuous log backup schedule.
- IncPlan: Incremental backup schedule.
- MaxRetrySeconds: Reconnection timeout period.
- Target: Backup target.
- HostUuid: UUID of the client host.
- ContinuousUuid: UUID of the continuous log backup plan.
- CumulativePlan: Cumulative incremental backup schedule.
- FullPlan: Full backup schedule.
- LogPlan: Log backup schedule.
- MaxRateLimit: Speed limit.
- FullUuid: UUID of the full backup plan.
- DbPlanName: Name of the backup plan.
Example
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Options": {
"Type": "String",
"Description": "The backup options in JSON format. The value varies for each database type. For Oracle, use {\"channels\":4,\"compression\":\"lzop\",\"offline_backup\":false,\"archivelog_reserve_hours\":24,\"custom_commands\":\"\"}. The channels parameter specifies the number of concurrent threads. The archivelog_reserve_hours parameter specifies the time in hours before the archive log is deleted after a backup job is complete. Use the default values for other parameters. For MySQL, use {\"channels\":4,\"compression\":\"lzop\",\"del_binlog\":false}. The del_binlog parameter specifies whether to delete the binary log (binlog) after the backup is complete. This parameter is valid only for log backups or real-time backups. 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": "The UUID of the database instance.",
"Default": "d12729b82116154****"
},
"SourceType": {
"Type": "String",
"Description": "The database type. Valid values: MYSQL, ORACLE, and MSSQL.",
"Default": "MYSQL"
},
"VaultId": {
"Type": "String",
"Description": "The ID of the backup repository to which the backup plan is created. The backup data is stored in the repository.",
"Default": "v-df****"
},
"Source": {
"Type": "Json",
"Description": "The database instance or database to back up.",
"Default": "{\n \"Entries\": [\n \"mysql://MYSQL-3306\"\n ]\n}"
},
"ContinuousPlan": {
"Type": "String",
"Description": "The continuous backup schedule. Use { \"type\": \"continuous\" }.",
"Default": "continuous"
},
"IncPlan": {
"Type": "String",
"Description": "The incremental backup schedule. This parameter is valid only for MySQL and Oracle. For more information, see FullPlan.",
"Default": "{\n \"interval\": 1,\n \"start\": \"00:00:00\",\n \"type\": \"daily\"\n }"
},
"MaxRetrySeconds": {
"Type": "Number",
"Description": "The maximum number of retry seconds for a network failure.",
"Default": "600"
},
"HostUuid": {
"Type": "String",
"Description": "The UUID of the host where the database instance resides.",
"Default": "701781640b3afc****"
},
"FullPlan": {
"Type": "String",
"Description": "The full backup schedule. For daily backups, use: {\"type\": \"daily\", \"start\": \"00:00:00\", \"interval\": 3}. For weekly backups, use: {\"type\":\"weekly\",\"start\": \"03:00:00\",\"days\": [1,2,3,4,5],\"interval\": 1}. The days parameter can be 0 to 6, where 0 indicates Sunday. The interval can be 1 to 52.",
"Default": "{\n \"days\": [\n 6\n ],\n \"interval\": 1,\n \"start\": \"18:00:00\",\n \"type\": \"weekly\"\n }"
},
"DbPlanName": {
"Type": "String",
"Description": "The 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": "The backup options in JSON format. The value varies for each database type. For Oracle, use {\"channels\":4,\"compression\":\"lzop\",\"offline_backup\":false,\"archivelog_reserve_hours\":24,\"custom_commands\":\"\"}. The channels parameter specifies the number of concurrent threads. The archivelog_reserve_hours parameter specifies the time in hours before the archive log is deleted after a backup job is complete. Use the default values for other parameters. For MySQL, use {\"channels\":4,\"compression\":\"lzop\",\"del_binlog\":false}. The del_binlog parameter specifies whether to delete the binary log (binlog) after the backup is complete. This parameter is valid only for log backups or real-time backups. For SQL Server, use {\\\"channels\\\":4,\\\"verify\\\":false,\\\"compression\\\":\\\"lzop\\\",\\\"backup_new_databases\\\":false}.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"Options"
]
}
},
"InstanceUuid": {
"Description": "The UUID of the database instance.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"InstanceUuid"
]
}
},
"CumulativeUuid": {
"Description": "The UUID of the cumulative plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"CumulativeUuid"
]
}
},
"SourceType": {
"Description": "The database type. Valid values: MYSQL, ORACLE, and MSSQL.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"SourceType"
]
}
},
"PlanId": {
"Description": "The ID of the backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"PlanId"
]
}
},
"LogUuid": {
"Description": "The UUID of the log backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"LogUuid"
]
}
},
"VaultId": {
"Description": "The ID of the backup repository to which the backup plan is created. The backup data is stored in the repository.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"VaultId"
]
}
},
"IncUuid": {
"Description": "The UUID of the incremental backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"IncUuid"
]
}
},
"ContinuousPlan": {
"Description": "The continuous backup schedule. Use { \"type\": \"continuous\" }.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"ContinuousPlan"
]
}
},
"IncPlan": {
"Description": "The incremental backup schedule. This parameter is valid only for MySQL and Oracle. For more information, see FullPlan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"IncPlan"
]
}
},
"MaxRetrySeconds": {
"Description": "The maximum number of retry seconds for a network failure.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"MaxRetrySeconds"
]
}
},
"Target": {
"Description": "The target backup repository.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"Target"
]
}
},
"HostUuid": {
"Description": "The UUID of the host where the database instance resides.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"HostUuid"
]
}
},
"ContinuousUuid": {
"Description": "The UUID of the continuous backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"ContinuousUuid"
]
}
},
"CumulativePlan": {
"Description": "The cumulative backup schedule. This parameter is valid only for MSSQL. For more information, see FullPlan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"CumulativePlan"
]
}
},
"FullPlan": {
"Description": "The full backup schedule. For daily backups, use: {\"type\": \"daily\", \"start\": \"00:00:00\", \"interval\": 3}. For weekly backups, use: {\"type\":\"weekly\",\"start\": \"03:00:00\",\"days\": [1,2,3,4,5],\"interval\": 1}. The days parameter can be 0 to 6, where 0 indicates Sunday. The interval can be 1 to 52.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"FullPlan"
]
}
},
"LogPlan": {
"Description": "The log backup schedule. For more information, see FullPlan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"LogPlan"
]
}
},
"MaxRateLimit": {
"Description": "The maximum rate limit for the backup job.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"MaxRateLimit"
]
}
},
"FullUuid": {
"Description": "The UUID of the full backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"FullUuid"
]
}
},
"DbPlanName": {
"Description": "The display name of the backup plan.",
"Value": {
"Fn::GetAtt": [
"HBRDbPlan",
"DbPlanName"
]
}
}
}
}