1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. MysqlBackup
Viewing docs for tencentcloud 1.83.7
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.7
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:

    BackupMethod 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.
    InstanceId string
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    BackupDbTableLists List<MysqlBackupBackupDbTableList>
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    EncryptionFlag string
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    ManualBackupName string
    Manual backup alias. Maximum length is 60 characters.
    MysqlBackupId string
    ID of the resource.
    Timeouts MysqlBackupTimeouts
    BackupMethod 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.
    InstanceId string
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    BackupDbTableLists []MysqlBackupBackupDbTableListArgs
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    EncryptionFlag string
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    ManualBackupName string
    Manual backup alias. Maximum length is 60 characters.
    MysqlBackupId string
    ID of the resource.
    Timeouts MysqlBackupTimeoutsArgs
    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_table_lists list(object)
    List of databases and tables to backup. Only valid when backup_method is logical. 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 when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    manual_backup_name string
    Manual backup alias. Maximum length is 60 characters.
    mysql_backup_id string
    ID of the resource.
    timeouts object
    backupMethod 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.
    instanceId String
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    backupDbTableLists List<MysqlBackupBackupDbTableList>
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    encryptionFlag String
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    manualBackupName String
    Manual backup alias. Maximum length is 60 characters.
    mysqlBackupId String
    ID of the resource.
    timeouts MysqlBackupTimeouts
    backupMethod 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.
    instanceId string
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    backupDbTableLists MysqlBackupBackupDbTableList[]
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    encryptionFlag string
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    manualBackupName string
    Manual backup alias. Maximum length is 60 characters.
    mysqlBackupId string
    ID of the resource.
    timeouts MysqlBackupTimeouts
    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_table_lists Sequence[MysqlBackupBackupDbTableListArgs]
    List of databases and tables to backup. Only valid when backup_method is logical. 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 when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    manual_backup_name str
    Manual backup alias. Maximum length is 60 characters.
    mysql_backup_id str
    ID of the resource.
    timeouts MysqlBackupTimeoutsArgs
    backupMethod 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.
    instanceId String
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    backupDbTableLists List<Property Map>
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    encryptionFlag String
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    manualBackupName String
    Manual backup alias. Maximum length is 60 characters.
    mysqlBackupId String
    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:

    BackupId double
    ID of the backup task.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternetUrl string
    Internet download URL of the backup file.
    IntranetUrl string
    Intranet download URL of the backup file.
    BackupId float64
    ID of the backup task.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternetUrl string
    Internet download URL of the backup file.
    IntranetUrl 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.
    backupId Double
    ID of the backup task.
    id String
    The provider-assigned unique ID for this managed resource.
    internetUrl String
    Internet download URL of the backup file.
    intranetUrl String
    Intranet download URL of the backup file.
    backupId number
    ID of the backup task.
    id string
    The provider-assigned unique ID for this managed resource.
    internetUrl string
    Internet download URL of the backup file.
    intranetUrl 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.
    backupId Number
    ID of the backup task.
    id String
    The provider-assigned unique ID for this managed resource.
    internetUrl String
    Internet download URL of the backup file.
    intranetUrl 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) -> MysqlBackup
    func 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.
    The following state arguments are supported:
    BackupDbTableLists List<MysqlBackupBackupDbTableList>
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    BackupId double
    ID of the backup task.
    BackupMethod 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.
    EncryptionFlag string
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    InstanceId string
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    InternetUrl string
    Internet download URL of the backup file.
    IntranetUrl string
    Intranet download URL of the backup file.
    ManualBackupName string
    Manual backup alias. Maximum length is 60 characters.
    MysqlBackupId string
    ID of the resource.
    Timeouts MysqlBackupTimeouts
    BackupDbTableLists []MysqlBackupBackupDbTableListArgs
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    BackupId float64
    ID of the backup task.
    BackupMethod 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.
    EncryptionFlag string
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    InstanceId string
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    InternetUrl string
    Internet download URL of the backup file.
    IntranetUrl string
    Intranet download URL of the backup file.
    ManualBackupName string
    Manual backup alias. Maximum length is 60 characters.
    MysqlBackupId string
    ID of the resource.
    Timeouts MysqlBackupTimeoutsArgs
    backup_db_table_lists list(object)
    List of databases and tables to backup. Only valid when backup_method is logical. 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 when backup_method is physical. 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_name string
    Manual backup alias. Maximum length is 60 characters.
    mysql_backup_id string
    ID of the resource.
    timeouts object
    backupDbTableLists List<MysqlBackupBackupDbTableList>
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    backupId Double
    ID of the backup task.
    backupMethod 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.
    encryptionFlag String
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    instanceId String
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    internetUrl String
    Internet download URL of the backup file.
    intranetUrl String
    Intranet download URL of the backup file.
    manualBackupName String
    Manual backup alias. Maximum length is 60 characters.
    mysqlBackupId String
    ID of the resource.
    timeouts MysqlBackupTimeouts
    backupDbTableLists MysqlBackupBackupDbTableList[]
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    backupId number
    ID of the backup task.
    backupMethod 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.
    encryptionFlag string
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    instanceId string
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    internetUrl string
    Internet download URL of the backup file.
    intranetUrl string
    Intranet download URL of the backup file.
    manualBackupName string
    Manual backup alias. Maximum length is 60 characters.
    mysqlBackupId string
    ID of the resource.
    timeouts MysqlBackupTimeouts
    backup_db_table_lists Sequence[MysqlBackupBackupDbTableListArgs]
    List of databases and tables to backup. Only valid when backup_method is logical. 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 when backup_method is physical. 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_name str
    Manual backup alias. Maximum length is 60 characters.
    mysql_backup_id str
    ID of the resource.
    timeouts MysqlBackupTimeoutsArgs
    backupDbTableLists List<Property Map>
    List of databases and tables to backup. Only valid when backup_method is logical. The specified databases and tables must exist, otherwise backup may fail.
    backupId Number
    ID of the backup task.
    backupMethod 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.
    encryptionFlag String
    Whether to encrypt physical backup. Supported values include: on - yes, off - no. Only valid when backup_method is physical. If not specified, the instance's default backup encryption policy is used.
    instanceId String
    Instance ID, such as cdb-c1nl9rpv. It is identical to the instance ID displayed in the database console page.
    internetUrl String
    Internet download URL of the backup file.
    intranetUrl String
    Intranet download URL of the backup file.
    manualBackupName String
    Manual backup alias. Maximum length is 60 characters.
    mysqlBackupId String
    ID of the resource.
    timeouts Property Map

    Supporting Types

    MysqlBackupBackupDbTableList, MysqlBackupBackupDbTableListArgs

    Database string
    Database name.
    Table string
    Table name. If specified, backup this table in the database. If not specified, backup the entire database.
    Database string
    Database name.
    Table string
    Table name. If specified, backup this table in the database. If not specified, backup the entire database.
    database string
    Database name.
    table string
    Table name. If specified, backup this table in the database. If not specified, backup the entire database.
    database String
    Database name.
    table String
    Table name. If specified, backup this table in the database. If not specified, backup the entire database.
    database string
    Database name.
    table string
    Table name. If specified, backup this table in the database. If not specified, backup the entire database.
    database str
    Database name.
    table str
    Table name. If specified, backup this table in the database. If not specified, backup the entire database.
    database String
    Database name.
    table String
    Table name. If specified, backup this table in the database. If not specified, backup the entire database.

    MysqlBackupTimeouts, MysqlBackupTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create string
    delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.83.7
    published on Tuesday, Jun 30, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial