Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::HBR::DbPlan

Última atualização: Jun 27, 2026

Cria um plano de backup de banco de dados.

Sintaxe

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

Propriedades

Propriedade Tipo Obrigatório Atualização permitida Descrição Restrições
Options String Não Não Opções de backup. O valor é uma string JSON que varia conforme o SourceType.
  • Se SourceType for ORACLE, um exemplo de valor é {"channels":4,"compression":"lzop","offline_backup":false,"archivelog_reserve_hours":24,"custom_commands":""}
    • channels: número de jobs simultâneos.
    • archivelog_reserve_hours: horas de retenção do log de arquivamento após a conclusão do backup.
    • Use os valores padrão para os demais parâmetros.
    Nota Para mais informações sobre backup do Oracle, consulte Fazer backup de um banco de dados Oracle.
  • Se SourceType for MYSQL, um exemplo de valor é {"channels":4,"compression":"lzop","del_binlog":false}

    del_binlog define se o log binário (binlog) deve ser excluído após o backup. Válido apenas para backups de log ou backups em tempo real.

    Nota Para mais informações sobre backup do MYSQL, consulte Fazer backup de um banco de dados MYSQL.
  • Se SourceType for MSSQL, um exemplo de valor é {\"channels\":4,\"verify\":false,\"compression\":\"lzop\",\"backup_new_databases\":false}
    Nota Para mais informações sobre backup do MSSQL, consulte Fazer backup de um banco de dados SQL Server.
InstanceUuid String Não Não UUID da instância de banco de dados. Nenhuma
SourceType String Sim Sim Tipo da fonte de dados. Valores válidos:
  • MYSQL
  • ORACLE
  • MSSQL
VaultId String Sim Não ID do repositório Nenhuma
Source Map Não Não Instância de banco de dados para backup. Para mais informações, consulte Sintaxe de Source e Propriedades de Source.
ContinuousPlan String Não Sim Agendamento de backup contínuo de log. Valor: {"type": "continuous"}.
IncPlan String Não Sim Agendamento de backup incremental.

Este parâmetro é válido apenas para fontes de dados MYSQL e ORACLE.

O valor é uma string JSON. Exemplos:
  • Backups periódicos diários: {"type": "daily", "start": "00:00:00", "interval": 3}
  • Backups periódicos semanais: {"type":"weekly","start": "03:00:00","days": [1,2,3,4,5],"interval": 1}
Nota
  • day especifica o dia da semana. Valores válidos: 0 a 6. 0 indica domingo.
  • interval especifica o intervalo. Valores válidos: 1 a 52.
MaxRetrySeconds Integer Não Sim Tempo limite de reconexão. Segundos de espera antes de reconectar ao banco de dados após uma desconexão durante o backup. Valor padrão: 600.
HostUuid String Sim Não UUID do host cliente. Nenhuma
CumulativePlan String Não Sim Agendamento de backup incremental cumulativo.

Este parâmetro é válido apenas para fontes de dados MSSQL.

O valor é uma string JSON. Exemplos:
  • Backups periódicos diários: {"type": "daily", "start": "00:00:00", "interval": 3}
  • Backups periódicos semanais: {"type":"weekly","start": "03:00:00","days": [1,2,3,4,5],"interval": 1}
Nota
  • day especifica o dia da semana. Valores válidos: 0 a 6. 0 indica domingo.
  • interval especifica o intervalo. Valores válidos: 1 a 52.
FullPlan String Não Sim Agendamento de backup completo. O valor é uma string JSON. Exemplos:
  • Backups periódicos diários: {"type": "daily", "start": "00:00:00", "interval": 3}
  • Backups periódicos semanais: {"type":"weekly","start": "03:00:00","days": [1,2,3,4,5],"interval": 1}
Nota
  • day especifica o dia da semana. Valores válidos: 0 a 6. 0 indica domingo.
  • interval especifica o intervalo. Valores válidos: 1 a 52.
LogPlan String Não Sim Agendamento de backup de log. O valor é uma string JSON. Exemplos:
  • Backups periódicos diários: {"type": "daily", "start": "00:00:00", "interval": 3}
  • Backups periódicos semanais: {"type":"weekly","start": "03:00:00","days": [1,2,3,4,5],"interval": 1}
Nota
  • day especifica o dia da semana. Valores válidos: 0 a 6. 0 indica domingo.
  • interval especifica o intervalo. Valores válidos: 1 a 52.
MaxRateLimit Integer Não Sim Limite de velocidade. Valor padrão: 0, que indica ausência de limite de velocidade.
DbPlanName String Sim Sim Nome do plano de backup. Nenhuma

Sintaxe de Source

"Source": {
  "Entries": List
}

Propriedades de Source

Propriedade Tipo Obrigatório Atualização permitida Descrição Restrições
Entries List Não Não Fonte de backup. Valores válidos:
  • Se SourceType for ORACLE: ["oracle://${instanceName}", "oracle://${instanceName}/archivelog"].

    ${instanceName} é o nome da instância de banco de dados Oracle. Obtenha esse nome no recurso dbAgent (ORACLE).

  • Se SourceType for MYSQL: ["mysql://${instanceName}"].

    ${instanceName} é o nome da instância de banco de dados MYSQL. Obtenha esse nome no recurso dbAgent (MySQL).

  • Se SourceType for MSSQL: ["mssql://${instanceName}/${database1}", "mssql://${instanceName}/${database2}"].

    Obtenha ${database} no recurso dbAgent (MSSQL).

Valores de retorno

Fn::GetAtt

  • Options: opções de backup em formato JSON.

  • InstanceUuid: UUID da instância de banco de dados.

  • CumulativeUuid: UUID do plano cumulativo.

  • SourceType: tipo do banco de dados.

  • PlanId: ID do plano de backup.

  • LogUuid: UUID do plano de backup de log.

  • VaultId: ID do repositório de backup.

  • IncUuid: UUID do plano de backup incremental.

  • ContinuousPlan: agendamento de backup contínuo de log.

  • IncPlan: agendamento de backup incremental.

  • MaxRetrySeconds: tempo limite de reconexão.

  • Target: destino do backup.

  • HostUuid: UUID do host cliente.

  • ContinuousUuid: UUID do plano de backup contínuo de log.

  • CumulativePlan: agendamento de backup incremental cumulativo.

  • FullPlan: agendamento de backup completo.

  • LogPlan: agendamento de backup de log.

  • MaxRateLimit: limite de velocidade.

  • FullUuid: UUID do plano de backup completo.

  • DbPlanName: nome do plano de backup.

Exemplo

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