published on Tuesday, Jun 30, 2026 by tencentcloudstack
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Provides a resource to create a CDB mysql backup
NOTE: Concurrent backups are not supported; multiple backups must be executed sequentially.
Documentation: https://cloud.tencent.com/document/product/236/35172
TencentDB for MySQL (Local Disk)—supporting 2-node, 3-node, and 4-node architectures—supports two backup types:
Physical backup: A full copy of physical data (supported by automatic backups).
Logical backup: Backup via SQL statements (supported by both manual and automatic backups).
TencentDB for MySQL Single-Node (Cloud Disk) and Cloud Disk editions support snapshot backups:
Snapshot backup: Backup performed by creating snapshots of disks at the storage layer (supported by both automatic and manual backups).
Example Usage
Create a physical full backup
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const zones = tencentcloud.getAvailabilityZonesByProduct({
product: "cdb",
});
const vpc = new tencentcloud.Vpc("vpc", {
name: "vpc-mysql",
cidrBlock: "10.0.0.0/16",
});
const subnet = new tencentcloud.Subnet("subnet", {
availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
name: "subnet-mysql",
vpcId: vpc.vpcId,
cidrBlock: "10.0.0.0/16",
isMulticast: false,
});
const securityGroup = new tencentcloud.SecurityGroup("security_group", {
name: "sg-mysql",
description: "mysql test",
});
const example = new tencentcloud.MysqlInstance("example", {
internetService: 1,
engineVersion: "5.7",
chargeType: "POSTPAID",
rootPassword: "PassWord123",
slaveDeployMode: 0,
availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
slaveSyncMode: 1,
instanceName: "tf-example-mysql",
memSize: 4000,
volumeSize: 200,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
intranetPort: 3306,
securityGroups: [securityGroup.securityGroupId],
tags: {
name: "test",
},
parameters: {
character_set_server: "utf8",
max_connections: "1000",
},
});
const exampleMysqlBackup = new tencentcloud.MysqlBackup("example", {
instanceId: example.mysqlInstanceId,
backupMethod: "physical",
manualBackupName: "tf-example-backup",
encryptionFlag: "off",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
zones = tencentcloud.get_availability_zones_by_product(product="cdb")
vpc = tencentcloud.Vpc("vpc",
name="vpc-mysql",
cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
availability_zone=zones.zones[0].name,
name="subnet-mysql",
vpc_id=vpc.vpc_id,
cidr_block="10.0.0.0/16",
is_multicast=False)
security_group = tencentcloud.SecurityGroup("security_group",
name="sg-mysql",
description="mysql test")
example = tencentcloud.MysqlInstance("example",
internet_service=1,
engine_version="5.7",
charge_type="POSTPAID",
root_password="PassWord123",
slave_deploy_mode=0,
availability_zone=zones.zones[0].name,
slave_sync_mode=1,
instance_name="tf-example-mysql",
mem_size=4000,
volume_size=200,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
intranet_port=3306,
security_groups=[security_group.security_group_id],
tags={
"name": "test",
},
parameters={
"character_set_server": "utf8",
"max_connections": "1000",
})
example_mysql_backup = tencentcloud.MysqlBackup("example",
instance_id=example.mysql_instance_id,
backup_method="physical",
manual_backup_name="tf-example-backup",
encryption_flag="off")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
Product: "cdb",
}, nil)
if err != nil {
return err
}
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
Name: pulumi.String("vpc-mysql"),
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
Name: pulumi.String("subnet-mysql"),
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.0.0/16"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
securityGroup, err := tencentcloud.NewSecurityGroup(ctx, "security_group", &tencentcloud.SecurityGroupArgs{
Name: pulumi.String("sg-mysql"),
Description: pulumi.String("mysql test"),
})
if err != nil {
return err
}
example, err := tencentcloud.NewMysqlInstance(ctx, "example", &tencentcloud.MysqlInstanceArgs{
InternetService: pulumi.Float64(1),
EngineVersion: pulumi.String("5.7"),
ChargeType: pulumi.String("POSTPAID"),
RootPassword: pulumi.String("PassWord123"),
SlaveDeployMode: pulumi.Float64(0),
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
SlaveSyncMode: pulumi.Float64(1),
InstanceName: pulumi.String("tf-example-mysql"),
MemSize: pulumi.Float64(4000),
VolumeSize: pulumi.Float64(200),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
IntranetPort: pulumi.Float64(3306),
SecurityGroups: pulumi.StringArray{
securityGroup.SecurityGroupId,
},
Tags: pulumi.StringMap{
"name": pulumi.String("test"),
},
Parameters: pulumi.StringMap{
"character_set_server": pulumi.String("utf8"),
"max_connections": pulumi.String("1000"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewMysqlBackup(ctx, "example", &tencentcloud.MysqlBackupArgs{
InstanceId: example.MysqlInstanceId,
BackupMethod: pulumi.String("physical"),
ManualBackupName: pulumi.String("tf-example-backup"),
EncryptionFlag: pulumi.String("off"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
{
Product = "cdb",
});
var vpc = new Tencentcloud.Vpc("vpc", new()
{
Name = "vpc-mysql",
CidrBlock = "10.0.0.0/16",
});
var subnet = new Tencentcloud.Subnet("subnet", new()
{
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
Name = "subnet-mysql",
VpcId = vpc.VpcId,
CidrBlock = "10.0.0.0/16",
IsMulticast = false,
});
var securityGroup = new Tencentcloud.SecurityGroup("security_group", new()
{
Name = "sg-mysql",
Description = "mysql test",
});
var example = new Tencentcloud.MysqlInstance("example", new()
{
InternetService = 1,
EngineVersion = "5.7",
ChargeType = "POSTPAID",
RootPassword = "PassWord123",
SlaveDeployMode = 0,
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
SlaveSyncMode = 1,
InstanceName = "tf-example-mysql",
MemSize = 4000,
VolumeSize = 200,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
IntranetPort = 3306,
SecurityGroups = new[]
{
securityGroup.SecurityGroupId,
},
Tags =
{
{ "name", "test" },
},
Parameters =
{
{ "character_set_server", "utf8" },
{ "max_connections", "1000" },
},
});
var exampleMysqlBackup = new Tencentcloud.MysqlBackup("example", new()
{
InstanceId = example.MysqlInstanceId,
BackupMethod = "physical",
ManualBackupName = "tf-example-backup",
EncryptionFlag = "off",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesByProductArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.MysqlInstance;
import com.pulumi.tencentcloud.MysqlInstanceArgs;
import com.pulumi.tencentcloud.MysqlBackup;
import com.pulumi.tencentcloud.MysqlBackupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
.product("cdb")
.build());
var vpc = new Vpc("vpc", VpcArgs.builder()
.name("vpc-mysql")
.cidrBlock("10.0.0.0/16")
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.availabilityZone(zones.zones()[0].name())
.name("subnet-mysql")
.vpcId(vpc.vpcId())
.cidrBlock("10.0.0.0/16")
.isMulticast(false)
.build());
var securityGroup = new SecurityGroup("securityGroup", SecurityGroupArgs.builder()
.name("sg-mysql")
.description("mysql test")
.build());
var example = new MysqlInstance("example", MysqlInstanceArgs.builder()
.internetService(1.0)
.engineVersion("5.7")
.chargeType("POSTPAID")
.rootPassword("PassWord123")
.slaveDeployMode(0.0)
.availabilityZone(zones.zones()[0].name())
.slaveSyncMode(1.0)
.instanceName("tf-example-mysql")
.memSize(4000.0)
.volumeSize(200.0)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.intranetPort(3306.0)
.securityGroups(securityGroup.securityGroupId())
.tags(Map.of("name", "test"))
.parameters(Map.ofEntries(
Map.entry("character_set_server", "utf8"),
Map.entry("max_connections", "1000")
))
.build());
var exampleMysqlBackup = new MysqlBackup("exampleMysqlBackup", MysqlBackupArgs.builder()
.instanceId(example.mysqlInstanceId())
.backupMethod("physical")
.manualBackupName("tf-example-backup")
.encryptionFlag("off")
.build());
}
}
resources:
vpc:
type: tencentcloud:Vpc
properties:
name: vpc-mysql
cidrBlock: 10.0.0.0/16
subnet:
type: tencentcloud:Subnet
properties:
availabilityZone: ${zones.zones[0].name}
name: subnet-mysql
vpcId: ${vpc.vpcId}
cidrBlock: 10.0.0.0/16
isMulticast: false
securityGroup:
type: tencentcloud:SecurityGroup
name: security_group
properties:
name: sg-mysql
description: mysql test
example:
type: tencentcloud:MysqlInstance
properties:
internetService: 1
engineVersion: '5.7'
chargeType: POSTPAID
rootPassword: PassWord123
slaveDeployMode: 0
availabilityZone: ${zones.zones[0].name}
slaveSyncMode: 1
instanceName: tf-example-mysql
memSize: 4000
volumeSize: 200
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
intranetPort: 3306
securityGroups:
- ${securityGroup.securityGroupId}
tags:
name: test
parameters:
character_set_server: utf8
max_connections: '1000'
exampleMysqlBackup:
type: tencentcloud:MysqlBackup
name: example
properties:
instanceId: ${example.mysqlInstanceId}
backupMethod: physical
manualBackupName: tf-example-backup
encryptionFlag: off
variables:
zones:
fn::invoke:
function: tencentcloud:getAvailabilityZonesByProduct
arguments:
product: cdb
Example coming soon!
Create a logical backup with specific database and table
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const logical = new tencentcloud.MysqlBackup("logical", {
instanceId: example.id,
backupMethod: "logical",
manualBackupName: "tf-logical-backup",
backupDbTableLists: [
{
database: "db1",
table: "tb1",
},
{
database: "db2",
},
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
logical = tencentcloud.MysqlBackup("logical",
instance_id=example["id"],
backup_method="logical",
manual_backup_name="tf-logical-backup",
backup_db_table_lists=[
{
"database": "db1",
"table": "tb1",
},
{
"database": "db2",
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewMysqlBackup(ctx, "logical", &tencentcloud.MysqlBackupArgs{
InstanceId: pulumi.Any(example.Id),
BackupMethod: pulumi.String("logical"),
ManualBackupName: pulumi.String("tf-logical-backup"),
BackupDbTableLists: tencentcloud.MysqlBackupBackupDbTableListArray{
&tencentcloud.MysqlBackupBackupDbTableListArgs{
Database: pulumi.String("db1"),
Table: pulumi.String("tb1"),
},
&tencentcloud.MysqlBackupBackupDbTableListArgs{
Database: pulumi.String("db2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var logical = new Tencentcloud.MysqlBackup("logical", new()
{
InstanceId = example.Id,
BackupMethod = "logical",
ManualBackupName = "tf-logical-backup",
BackupDbTableLists = new[]
{
new Tencentcloud.Inputs.MysqlBackupBackupDbTableListArgs
{
Database = "db1",
Table = "tb1",
},
new Tencentcloud.Inputs.MysqlBackupBackupDbTableListArgs
{
Database = "db2",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.MysqlBackup;
import com.pulumi.tencentcloud.MysqlBackupArgs;
import com.pulumi.tencentcloud.inputs.MysqlBackupBackupDbTableListArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var logical = new MysqlBackup("logical", MysqlBackupArgs.builder()
.instanceId(example.id())
.backupMethod("logical")
.manualBackupName("tf-logical-backup")
.backupDbTableLists(
MysqlBackupBackupDbTableListArgs.builder()
.database("db1")
.table("tb1")
.build(),
MysqlBackupBackupDbTableListArgs.builder()
.database("db2")
.build())
.build());
}
}
resources:
logical:
type: tencentcloud:MysqlBackup
properties:
instanceId: ${example.id}
backupMethod: logical
manualBackupName: tf-logical-backup
backupDbTableLists:
- database: db1
table: tb1
- database: db2
Example coming soon!
Create MysqlBackup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MysqlBackup(name: string, args: MysqlBackupArgs, opts?: CustomResourceOptions);@overload
def MysqlBackup(resource_name: str,
args: MysqlBackupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MysqlBackup(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_method: Optional[str] = None,
instance_id: Optional[str] = None,
backup_db_table_lists: Optional[Sequence[MysqlBackupBackupDbTableListArgs]] = None,
encryption_flag: Optional[str] = None,
manual_backup_name: Optional[str] = None,
mysql_backup_id: Optional[str] = None,
timeouts: Optional[MysqlBackupTimeoutsArgs] = None)func NewMysqlBackup(ctx *Context, name string, args MysqlBackupArgs, opts ...ResourceOption) (*MysqlBackup, error)public MysqlBackup(string name, MysqlBackupArgs args, CustomResourceOptions? opts = null)
public MysqlBackup(String name, MysqlBackupArgs args)
public MysqlBackup(String name, MysqlBackupArgs args, CustomResourceOptions options)
type: tencentcloud:MysqlBackup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_mysqlbackup" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args MysqlBackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MysqlBackupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MysqlBackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MysqlBackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MysqlBackupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MysqlBackup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MysqlBackup resource accepts the following input properties:
- Backup
Method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - Instance
Id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - Backup
Db List<MysqlTable Lists Backup Backup Db Table List> - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - Encryption
Flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - Manual
Backup stringName - Manual backup alias. Maximum length is 60 characters.
- Mysql
Backup stringId - ID of the resource.
- Timeouts
Mysql
Backup Timeouts
- Backup
Method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - Instance
Id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - Backup
Db []MysqlTable Lists Backup Backup Db Table List Args - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - Encryption
Flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - Manual
Backup stringName - Manual backup alias. Maximum length is 60 characters.
- Mysql
Backup stringId - ID of the resource.
- Timeouts
Mysql
Backup Timeouts Args
- backup_
method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - instance_
id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - backup_
db_ list(object)table_ lists - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - encryption_
flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - manual_
backup_ stringname - Manual backup alias. Maximum length is 60 characters.
- mysql_
backup_ stringid - ID of the resource.
- timeouts object
- backup
Method String - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - instance
Id String - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - backup
Db List<MysqlTable Lists Backup Backup Db Table List> - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - encryption
Flag String - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - manual
Backup StringName - Manual backup alias. Maximum length is 60 characters.
- mysql
Backup StringId - ID of the resource.
- timeouts
Mysql
Backup Timeouts
- backup
Method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - instance
Id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - backup
Db MysqlTable Lists Backup Backup Db Table List[] - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - encryption
Flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - manual
Backup stringName - Manual backup alias. Maximum length is 60 characters.
- mysql
Backup stringId - ID of the resource.
- timeouts
Mysql
Backup Timeouts
- backup_
method str - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - instance_
id str - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - backup_
db_ Sequence[Mysqltable_ lists Backup Backup Db Table List Args] - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - encryption_
flag str - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - manual_
backup_ strname - Manual backup alias. Maximum length is 60 characters.
- mysql_
backup_ strid - ID of the resource.
- timeouts
Mysql
Backup Timeouts Args
- backup
Method String - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - instance
Id String - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - backup
Db List<Property Map>Table Lists - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - encryption
Flag String - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - manual
Backup StringName - Manual backup alias. Maximum length is 60 characters.
- mysql
Backup StringId - ID of the resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the MysqlBackup resource produces the following output properties:
- Backup
Id double - ID of the backup task.
- Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Url string - Internet download URL of the backup file.
- Intranet
Url string - Intranet download URL of the backup file.
- Backup
Id float64 - ID of the backup task.
- Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Url string - Internet download URL of the backup file.
- Intranet
Url string - Intranet download URL of the backup file.
- backup_
id number - ID of the backup task.
- id string
- The provider-assigned unique ID for this managed resource.
- internet_
url string - Internet download URL of the backup file.
- intranet_
url string - Intranet download URL of the backup file.
- backup
Id Double - ID of the backup task.
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Url String - Internet download URL of the backup file.
- intranet
Url String - Intranet download URL of the backup file.
- backup
Id number - ID of the backup task.
- id string
- The provider-assigned unique ID for this managed resource.
- internet
Url string - Internet download URL of the backup file.
- intranet
Url string - Intranet download URL of the backup file.
- backup_
id float - ID of the backup task.
- id str
- The provider-assigned unique ID for this managed resource.
- internet_
url str - Internet download URL of the backup file.
- intranet_
url str - Intranet download URL of the backup file.
- backup
Id Number - ID of the backup task.
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Url String - Internet download URL of the backup file.
- intranet
Url String - Intranet download URL of the backup file.
Look up Existing MysqlBackup Resource
Get an existing MysqlBackup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MysqlBackupState, opts?: CustomResourceOptions): MysqlBackup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_db_table_lists: Optional[Sequence[MysqlBackupBackupDbTableListArgs]] = None,
backup_id: Optional[float] = None,
backup_method: Optional[str] = None,
encryption_flag: Optional[str] = None,
instance_id: Optional[str] = None,
internet_url: Optional[str] = None,
intranet_url: Optional[str] = None,
manual_backup_name: Optional[str] = None,
mysql_backup_id: Optional[str] = None,
timeouts: Optional[MysqlBackupTimeoutsArgs] = None) -> MysqlBackupfunc GetMysqlBackup(ctx *Context, name string, id IDInput, state *MysqlBackupState, opts ...ResourceOption) (*MysqlBackup, error)public static MysqlBackup Get(string name, Input<string> id, MysqlBackupState? state, CustomResourceOptions? opts = null)public static MysqlBackup get(String name, Output<String> id, MysqlBackupState state, CustomResourceOptions options)resources: _: type: tencentcloud:MysqlBackup get: id: ${id}import {
to = tencentcloud_mysqlbackup.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Backup
Db List<MysqlTable Lists Backup Backup Db Table List> - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - Backup
Id double - ID of the backup task.
- Backup
Method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - Encryption
Flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - Instance
Id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - Internet
Url string - Internet download URL of the backup file.
- Intranet
Url string - Intranet download URL of the backup file.
- Manual
Backup stringName - Manual backup alias. Maximum length is 60 characters.
- Mysql
Backup stringId - ID of the resource.
- Timeouts
Mysql
Backup Timeouts
- Backup
Db []MysqlTable Lists Backup Backup Db Table List Args - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - Backup
Id float64 - ID of the backup task.
- Backup
Method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - Encryption
Flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - Instance
Id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - Internet
Url string - Internet download URL of the backup file.
- Intranet
Url string - Intranet download URL of the backup file.
- Manual
Backup stringName - Manual backup alias. Maximum length is 60 characters.
- Mysql
Backup stringId - ID of the resource.
- Timeouts
Mysql
Backup Timeouts Args
- backup_
db_ list(object)table_ lists - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - backup_
id number - ID of the backup task.
- backup_
method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - encryption_
flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - instance_
id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - internet_
url string - Internet download URL of the backup file.
- intranet_
url string - Intranet download URL of the backup file.
- manual_
backup_ stringname - Manual backup alias. Maximum length is 60 characters.
- mysql_
backup_ stringid - ID of the resource.
- timeouts object
- backup
Db List<MysqlTable Lists Backup Backup Db Table List> - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - backup
Id Double - ID of the backup task.
- backup
Method String - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - encryption
Flag String - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - instance
Id String - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - internet
Url String - Internet download URL of the backup file.
- intranet
Url String - Intranet download URL of the backup file.
- manual
Backup StringName - Manual backup alias. Maximum length is 60 characters.
- mysql
Backup StringId - ID of the resource.
- timeouts
Mysql
Backup Timeouts
- backup
Db MysqlTable Lists Backup Backup Db Table List[] - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - backup
Id number - ID of the backup task.
- backup
Method string - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - encryption
Flag string - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - instance
Id string - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - internet
Url string - Internet download URL of the backup file.
- intranet
Url string - Intranet download URL of the backup file.
- manual
Backup stringName - Manual backup alias. Maximum length is 60 characters.
- mysql
Backup stringId - ID of the resource.
- timeouts
Mysql
Backup Timeouts
- backup_
db_ Sequence[Mysqltable_ lists Backup Backup Db Table List Args] - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - backup_
id float - ID of the backup task.
- backup_
method str - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - encryption_
flag str - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - instance_
id str - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - internet_
url str - Internet download URL of the backup file.
- intranet_
url str - Intranet download URL of the backup file.
- manual_
backup_ strname - Manual backup alias. Maximum length is 60 characters.
- mysql_
backup_ strid - ID of the resource.
- timeouts
Mysql
Backup Timeouts Args
- backup
Db List<Property Map>Table Lists - List of databases and tables to backup. Only valid when
backup_methodislogical. The specified databases and tables must exist, otherwise backup may fail. - backup
Id Number - ID of the backup task.
- backup
Method String - Target backup method. Supported values include:
logical- logical cold backup,physical- physical cold backup,snapshot- snapshot backup. Basic edition instances only support snapshot backup. - encryption
Flag String - Whether to encrypt physical backup. Supported values include:
on- yes,off- no. Only valid whenbackup_methodisphysical. If not specified, the instance's default backup encryption policy is used. - instance
Id String - Instance ID, such as
cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page. - internet
Url String - Internet download URL of the backup file.
- intranet
Url String - Intranet download URL of the backup file.
- manual
Backup StringName - Manual backup alias. Maximum length is 60 characters.
- mysql
Backup StringId - ID of the resource.
- timeouts Property Map
Supporting Types
MysqlBackupBackupDbTableList, MysqlBackupBackupDbTableListArgs
MysqlBackupTimeouts, MysqlBackupTimeoutsArgs
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Tuesday, Jun 30, 2026 by tencentcloudstack