O recurso ALIYUN::DBS::RestoreTask cria uma tarefa de restauração de recuperação de desastres de dados.
Sintaxe
{
"Type": "ALIYUN::DBS::RestoreTask",
"Properties": {
"StartTask": Boolean,
"RestoreDir": String,
"DuplicateConflict": String,
"RestoreHome": String,
"DestinationEndpointPassword": String,
"DestinationEndpointIP": String,
"DestinationEndpointPort": Integer,
"DestinationEndpointOracleSID": String,
"BackupSetId": String,
"DestinationEndpointInstanceType": String,
"RestoreTime": Integer,
"DestinationEndpointRegion": String,
"DestinationEndpointDatabaseName": String,
"DestinationEndpointUserName": String,
"RestoreObjects": String,
"RestoreTaskName": String,
"BackupPlanId": String,
"BackupGatewayId": Integer,
"DestinationEndpointInstanceID": String
}
}
Propriedades
Propriedade | Tipo | Obrigatório | Editável | Descrição | Restrição |
StartTask | Boolean | Não | Não | Defina se a tarefa de restauração será iniciada. | Valores válidos:
|
DuplicateConflict | String | Não | Não | Método para tratar conflitos quando um objeto da tarefa de restauração tem o mesmo nome de um objeto existente. | Valores válidos:
|
RestoreHome | String | Não | Não | Diretório do programa do banco de dados. | Nenhuma. |
DestinationEndpointPassword | String | Não | Não | A senha. | Especifique esta propriedade, exceto para bancos de dados SQL Server conectados por gateways de backup ou bancos de dados Redis. |
DestinationEndpointIP | String | Não | Não | O endpoint do banco de dados. | Especifique esta propriedade quando DestinationEndpointInstanceType for Express, Agent ou Other. |
DestinationEndpointPort | Integer | Não | Não | A porta do banco de dados. | Especifique esta propriedade quando DestinationEndpointInstanceType for Express, Agent, Other ou ECS. |
DestinationEndpointOracleSID | String | Não | Não | O ID do sistema (SID) do banco de dados Oracle. | Obrigatório para bancos de dados Oracle. |
BackupSetId | String | Não | Não | ID do conjunto de backup completo usado na restauração. | Não é possível especificar BackupSetId e RestoreTime simultaneamente. |
DestinationEndpointInstanceType | String | Sim | Não | Categoria do banco de dados. | Valores válidos:
|
RestoreTime | Integer | Não | Não | Ponto no tempo para restauração dos dados. | O valor deve ser um timestamp. |
DestinationEndpointRegion | String | Não | Não | Região do banco de dados. | Obrigatório quando DestinationEndpointInstanceType for RDS, ECS, DDS, Express ou Agent. |
DestinationEndpointDatabaseName | String | Não | Não | Nome do banco de dados. | Obrigatório para bancos de dados PostgreSQL ou MongoDB. |
DestinationEndpointUserName | String | Não | Não | Nome de usuário da conta de conexão ao banco de dados. | Especifique esta propriedade, exceto para bancos de dados SQL Server conectados por gateways de backup ou bancos de dados Redis. |
RestoreObjects | String | Não | Não | Objetos a restaurar na tarefa. | Obrigatório, exceto para bancos de dados conectados por gateways de backup. O valor deve seguir este formato: |
RestoreTaskName | String | Sim | Não | Nome da tarefa de restauração. | Nenhuma. |
BackupPlanId | String | Sim | Não | ID do plano de backup. | Nenhuma. |
BackupGatewayId | Integer | Não | Não | ID do gateway de backup. | Obrigatório quando DestinationEndpointInstanceType for Agent. |
DestinationEndpointInstanceID | String | Não | Não | ID da instância do banco de dados. | Obrigatório quando DestinationEndpointInstanceType for RDS, ECS, DDS ou Express. |
RestoreDir | String | Não | Não | Diretório de restauração. | Especifique esta propriedade quando DestinationEndpointInstanceType for Agent e o objeto de backup do plano for um banco de dados MySQL. |
Valores de retorno
Fn::GetAtt
RestoreTaskId: o ID da tarefa de restauração.
Exemplos
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"StartTask": {
"Type": "Boolean",
"Description": "Just create a recovery task and not perform the recovery task temporarily. Do not start restore task.",
"AllowedValues": [
"True",
"true",
"False",
"false"
],
"Default": true
},
"RestoreDir": {
"Type": "String",
"Description": "DestinationEndpointInstanceType this parameter is required when agent is specified and the backup schedule is MySQL."
},
"DuplicateConflict": {
"Type": "String",
"Description": "The handling method for conflicts between objects with the same name. Valid values:\nfailure: The object with the same name fails (default).\nrenamenew: renames an object with the same name.",
"AllowedValues": [
"failure",
"renamenew"
]
},
"RestoreHome": {
"Type": "String",
"Description": "Database Program Directory."
},
"DestinationEndpointPassword": {
"Type": "String",
"Description": "The password that is used to log on to the RDS instance.\nNote You must specify this parameter when the database type is Redis, or the database location\nis agent and the database type is MSSQL."
},
"DestinationEndpointIP": {
"Type": "String",
"Description": "The endpoint used to connect to the database.\nNoteDestinationEndpointInstanceType is express, agent, or other. This parameter is required."
},
"DestinationEndpointPort": {
"Type": "Number",
"Description": "The port that is used to access the database of the primary MySQL server.\nNoteDestinationEndpointInstanceType is in the format of express, agent, other, or ECS. This parameter is required."
},
"DestinationEndpointOracleSID": {
"Type": "String",
"Description": "The SID of the Oracle instance.\nNote This parameter is required if the database type is Oracle."
},
"BackupSetId": {
"Type": "String",
"Description": "The ID of the full backup set used for restoration, which is mutually exclusive to\nRestoreTime."
},
"DestinationEndpointInstanceType": {
"Type": "String",
"Description": "The location of the database. Valid values: \n- rds \n- ecs \n- express: a database connected over express connect, VPN Gateway, or smart gateway. \n- agent: The database connected through the backup Gateway \n- dds: apsaradb for MongoDB \n- kvstore \n- polardb \n- drds \n- dg: the database is directly connected through IP Address: Port."
},
"RestoreTime": {
"Type": "Number",
"Description": "The time when the fault is restored. Set the value to 1554560477000."
},
"DestinationEndpointRegion": {
"Type": "String",
"Description": "The region of the database.\nNoteDestinationEndpointInstanceType for RDS, ECS, DDS, Express, or Agent, this parameter is required."
},
"DestinationEndpointDatabaseName": {
"Type": "String",
"Description": "The name of the RDS database.\nNote When the database type is PostgreSQL or MongoDB, this parameter is required."
},
"DestinationEndpointUserName": {
"Type": "String",
"Description": "The database account.\nNote You must specify this parameter when the database type is Redis, or the database location\nis agent and the database type is MSSQL."
},
"RestoreObjects": {
"Type": "String",
"Description": "Restore an object.\nNote For details, see the following RestoreObjects if the database is located in an agent, this parameter is required in other scenarios."
},
"RestoreTaskName": {
"Type": "String",
"Description": "The name of the restoration task."
},
"BackupPlanId": {
"Type": "String",
"Description": "The ID of the backup plan."
},
"BackupGatewayId": {
"Type": "Number",
"Description": "The ID of the backup gateway.\nNoteDestinationEndpointInstanceType if you set this parameter to agent, this parameter is required."
},
"DestinationEndpointInstanceID": {
"Type": "String",
"Description": "The ID of the ApsaraDB RDS instance to query.\nNoteDestinationEndpointInstanceType if the value is RDS, ECS, DDS, or Express, this parameter is required."
}
},
"Resources": {
"RestoreTask": {
"Type": "ALIYUN::DBS::RestoreTask",
"Properties": {
"StartTask": {
"Ref": "StartTask"
},
"RestoreDir": {
"Ref": "RestoreDir"
},
"DuplicateConflict": {
"Ref": "DuplicateConflict"
},
"RestoreHome": {
"Ref": "RestoreHome"
},
"DestinationEndpointPassword": {
"Ref": "DestinationEndpointPassword"
},
"DestinationEndpointIP": {
"Ref": "DestinationEndpointIP"
},
"DestinationEndpointPort": {
"Ref": "DestinationEndpointPort"
},
"DestinationEndpointOracleSID": {
"Ref": "DestinationEndpointOracleSID"
},
"BackupSetId": {
"Ref": "BackupSetId"
},
"DestinationEndpointInstanceType": {
"Ref": "DestinationEndpointInstanceType"
},
"RestoreTime": {
"Ref": "RestoreTime"
},
"DestinationEndpointRegion": {
"Ref": "DestinationEndpointRegion"
},
"DestinationEndpointDatabaseName": {
"Ref": "DestinationEndpointDatabaseName"
},
"DestinationEndpointUserName": {
"Ref": "DestinationEndpointUserName"
},
"RestoreObjects": {
"Ref": "RestoreObjects"
},
"RestoreTaskName": {
"Ref": "RestoreTaskName"
},
"BackupPlanId": {
"Ref": "BackupPlanId"
},
"BackupGatewayId": {
"Ref": "BackupGatewayId"
},
"DestinationEndpointInstanceID": {
"Ref": "DestinationEndpointInstanceID"
}
}
}
},
"Outputs": {
"RestoreTaskId": {
"Description": "The ID of the restoration task.",
"Value": {
"Fn::GetAtt": [
"RestoreTask",
"RestoreTaskId"
]
}
}
}
}
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
StartTask:
Type: Boolean
Description: >-
Just create a recovery task and not perform the recovery task temporarily.
Do not start restore task.
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
Default: true
RestoreDir:
Type: String
Description: >-
DestinationEndpointInstanceType this parameter is required when agent is
specified and the backup schedule is MySQL.
DuplicateConflict:
Type: String
Description: >-
The handling method for conflicts between objects with the same name.
Valid values:
failure: The object with the same name fails (default).
renamenew: renames an object with the same name.
AllowedValues:
- failure
- renamenew
RestoreHome:
Type: String
Description: Database Program Directory.
DestinationEndpointPassword:
Type: String
Description: >-
The password that is used to log on to the RDS instance.
Note You must specify this parameter when the database type is Redis, or
the database location
is agent and the database type is MSSQL.
DestinationEndpointIP:
Type: String
Description: >-
The endpoint used to connect to the database.
NoteDestinationEndpointInstanceType is express, agent, or other. This
parameter is required.
DestinationEndpointPort:
Type: Number
Description: >-
The port that is used to access the database of the primary MySQL server.
NoteDestinationEndpointInstanceType is in the format of express, agent,
other, or ECS. This parameter is required.
DestinationEndpointOracleSID:
Type: String
Description: |-
The SID of the Oracle instance.
Note This parameter is required if the database type is Oracle.
BackupSetId:
Type: String
Description: >-
The ID of the full backup set used for restoration, which is mutually
exclusive to
RestoreTime.
DestinationEndpointInstanceType:
Type: String
Description: >-
The location of the database. Valid values:
- rds
- ecs
- express: a database connected over express connect, VPN Gateway, or
smart gateway.
- agent: The database connected through the backup Gateway
- dds: apsaradb for MongoDB
- kvstore
- polardb
- drds
- dg: the database is directly connected through IP Address: Port.
RestoreTime:
Type: Number
Description: The time when the fault is restored. Set the value to 1554560477000.
DestinationEndpointRegion:
Type: String
Description: >-
The region of the database.
NoteDestinationEndpointInstanceType for RDS, ECS, DDS, Express, or Agent,
this parameter is required.
DestinationEndpointDatabaseName:
Type: String
Description: >-
The name of the RDS database.
Note When the database type is PostgreSQL or MongoDB, this parameter is
required.
DestinationEndpointUserName:
Type: String
Description: >-
The database account.
Note You must specify this parameter when the database type is Redis, or
the database location
is agent and the database type is MSSQL.
RestoreObjects:
Type: String
Description: >-
Restore an object.
Note For details, see the following RestoreObjects if the database is
located in an agent, this parameter is required in other scenarios.
RestoreTaskName:
Type: String
Description: The name of the restoration task.
BackupPlanId:
Type: String
Description: The ID of the backup plan.
BackupGatewayId:
Type: Number
Description: >-
The ID of the backup gateway.
NoteDestinationEndpointInstanceType if you set this parameter to agent,
this parameter is required.
DestinationEndpointInstanceID:
Type: String
Description: >-
The ID of the ApsaraDB RDS instance to query.
NoteDestinationEndpointInstanceType if the value is RDS, ECS, DDS, or
Express, this parameter is required.
Resources:
RestoreTask:
Type: 'ALIYUN::DBS::RestoreTask'
Properties:
StartTask:
Ref: StartTask
RestoreDir:
Ref: RestoreDir
DuplicateConflict:
Ref: DuplicateConflict
RestoreHome:
Ref: RestoreHome
DestinationEndpointPassword:
Ref: DestinationEndpointPassword
DestinationEndpointIP:
Ref: DestinationEndpointIP
DestinationEndpointPort:
Ref: DestinationEndpointPort
DestinationEndpointOracleSID:
Ref: DestinationEndpointOracleSID
BackupSetId:
Ref: BackupSetId
DestinationEndpointInstanceType:
Ref: DestinationEndpointInstanceType
RestoreTime:
Ref: RestoreTime
DestinationEndpointRegion:
Ref: DestinationEndpointRegion
DestinationEndpointDatabaseName:
Ref: DestinationEndpointDatabaseName
DestinationEndpointUserName:
Ref: DestinationEndpointUserName
RestoreObjects:
Ref: RestoreObjects
RestoreTaskName:
Ref: RestoreTaskName
BackupPlanId:
Ref: BackupPlanId
BackupGatewayId:
Ref: BackupGatewayId
DestinationEndpointInstanceID:
Ref: DestinationEndpointInstanceID
Outputs:
RestoreTaskId:
Description: The ID of the restoration task.
Value:
'Fn::GetAtt':
- RestoreTask
- RestoreTaskId