1. Packages
  2. Volcengine
  3. API Docs
  4. rds_postgresql
  5. DataBackup
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
volcengine logo
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine

    Provides a resource to manage rds postgresql data backup

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const example = new volcengine.rds_postgresql.DataBackup("example", {
        backupDescription: "tf demo full backup2",
        backupMethod: "Physical",
        backupScope: "Instance",
        backupType: "Full",
        instanceId: "postgres-72715e0d9f58",
    });
    const example1 = new volcengine.rds_postgresql.DataBackup("example1", {
        backupDescription: "tf demo logical backup",
        backupMethod: "Logical",
        backupScope: "Instance",
        instanceId: "postgres-72715e0d9f58",
    });
    const example2 = new volcengine.rds_postgresql.DataBackup("example2", {
        backupDescription: "tf demo database full backup",
        backupMetas: [
            {
                dbName: "test",
            },
            {
                dbName: "test-1",
            },
        ],
        backupMethod: "Logical",
        backupScope: "Database",
        instanceId: "postgres-72715e0d9f58",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    example = volcengine.rds_postgresql.DataBackup("example",
        backup_description="tf demo full backup2",
        backup_method="Physical",
        backup_scope="Instance",
        backup_type="Full",
        instance_id="postgres-72715e0d9f58")
    example1 = volcengine.rds_postgresql.DataBackup("example1",
        backup_description="tf demo logical backup",
        backup_method="Logical",
        backup_scope="Instance",
        instance_id="postgres-72715e0d9f58")
    example2 = volcengine.rds_postgresql.DataBackup("example2",
        backup_description="tf demo database full backup",
        backup_metas=[
            volcengine.rds_postgresql.DataBackupBackupMetaArgs(
                db_name="test",
            ),
            volcengine.rds_postgresql.DataBackupBackupMetaArgs(
                db_name="test-1",
            ),
        ],
        backup_method="Logical",
        backup_scope="Database",
        instance_id="postgres-72715e0d9f58")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_postgresql"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rds_postgresql.NewDataBackup(ctx, "example", &rds_postgresql.DataBackupArgs{
    			BackupDescription: pulumi.String("tf demo full backup2"),
    			BackupMethod:      pulumi.String("Physical"),
    			BackupScope:       pulumi.String("Instance"),
    			BackupType:        pulumi.String("Full"),
    			InstanceId:        pulumi.String("postgres-72715e0d9f58"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds_postgresql.NewDataBackup(ctx, "example1", &rds_postgresql.DataBackupArgs{
    			BackupDescription: pulumi.String("tf demo logical backup"),
    			BackupMethod:      pulumi.String("Logical"),
    			BackupScope:       pulumi.String("Instance"),
    			InstanceId:        pulumi.String("postgres-72715e0d9f58"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds_postgresql.NewDataBackup(ctx, "example2", &rds_postgresql.DataBackupArgs{
    			BackupDescription: pulumi.String("tf demo database full backup"),
    			BackupMetas: rds_postgresql.DataBackupBackupMetaArray{
    				&rds_postgresql.DataBackupBackupMetaArgs{
    					DbName: pulumi.String("test"),
    				},
    				&rds_postgresql.DataBackupBackupMetaArgs{
    					DbName: pulumi.String("test-1"),
    				},
    			},
    			BackupMethod: pulumi.String("Logical"),
    			BackupScope:  pulumi.String("Database"),
    			InstanceId:   pulumi.String("postgres-72715e0d9f58"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Volcengine.Rds_postgresql.DataBackup("example", new()
        {
            BackupDescription = "tf demo full backup2",
            BackupMethod = "Physical",
            BackupScope = "Instance",
            BackupType = "Full",
            InstanceId = "postgres-72715e0d9f58",
        });
    
        var example1 = new Volcengine.Rds_postgresql.DataBackup("example1", new()
        {
            BackupDescription = "tf demo logical backup",
            BackupMethod = "Logical",
            BackupScope = "Instance",
            InstanceId = "postgres-72715e0d9f58",
        });
    
        var example2 = new Volcengine.Rds_postgresql.DataBackup("example2", new()
        {
            BackupDescription = "tf demo database full backup",
            BackupMetas = new[]
            {
                new Volcengine.Rds_postgresql.Inputs.DataBackupBackupMetaArgs
                {
                    DbName = "test",
                },
                new Volcengine.Rds_postgresql.Inputs.DataBackupBackupMetaArgs
                {
                    DbName = "test-1",
                },
            },
            BackupMethod = "Logical",
            BackupScope = "Database",
            InstanceId = "postgres-72715e0d9f58",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.rds_postgresql.DataBackup;
    import com.pulumi.volcengine.rds_postgresql.DataBackupArgs;
    import com.pulumi.volcengine.rds_postgresql.inputs.DataBackupBackupMetaArgs;
    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 example = new DataBackup("example", DataBackupArgs.builder()        
                .backupDescription("tf demo full backup2")
                .backupMethod("Physical")
                .backupScope("Instance")
                .backupType("Full")
                .instanceId("postgres-72715e0d9f58")
                .build());
    
            var example1 = new DataBackup("example1", DataBackupArgs.builder()        
                .backupDescription("tf demo logical backup")
                .backupMethod("Logical")
                .backupScope("Instance")
                .instanceId("postgres-72715e0d9f58")
                .build());
    
            var example2 = new DataBackup("example2", DataBackupArgs.builder()        
                .backupDescription("tf demo database full backup")
                .backupMetas(            
                    DataBackupBackupMetaArgs.builder()
                        .dbName("test")
                        .build(),
                    DataBackupBackupMetaArgs.builder()
                        .dbName("test-1")
                        .build())
                .backupMethod("Logical")
                .backupScope("Database")
                .instanceId("postgres-72715e0d9f58")
                .build());
    
        }
    }
    
    resources:
      example:
        type: volcengine:rds_postgresql:DataBackup
        properties:
          backupDescription: tf demo full backup2
          backupMethod: Physical
          backupScope: Instance
          backupType: Full
          instanceId: postgres-72715e0d9f58
      example1:
        type: volcengine:rds_postgresql:DataBackup
        properties:
          backupDescription: tf demo logical backup
          backupMethod: Logical
          backupScope: Instance
          instanceId: postgres-72715e0d9f58
      example2:
        type: volcengine:rds_postgresql:DataBackup
        properties:
          backupDescription: tf demo database full backup
          backupMetas:
            - dbName: test
            - dbName: test-1
          backupMethod: Logical
          backupScope: Database
          instanceId: postgres-72715e0d9f58
    

    Create DataBackup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DataBackup(name: string, args: DataBackupArgs, opts?: CustomResourceOptions);
    @overload
    def DataBackup(resource_name: str,
                   args: DataBackupArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataBackup(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   instance_id: Optional[str] = None,
                   backup_description: Optional[str] = None,
                   backup_metas: Optional[Sequence[DataBackupBackupMetaArgs]] = None,
                   backup_method: Optional[str] = None,
                   backup_scope: Optional[str] = None,
                   backup_type: Optional[str] = None)
    func NewDataBackup(ctx *Context, name string, args DataBackupArgs, opts ...ResourceOption) (*DataBackup, error)
    public DataBackup(string name, DataBackupArgs args, CustomResourceOptions? opts = null)
    public DataBackup(String name, DataBackupArgs args)
    public DataBackup(String name, DataBackupArgs args, CustomResourceOptions options)
    
    type: volcengine:rds_postgresql:DataBackup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DataBackupArgs
    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 DataBackupArgs
    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 DataBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataBackupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dataBackupResource = new Volcengine.Rds_postgresql.DataBackup("dataBackupResource", new()
    {
        InstanceId = "string",
        BackupDescription = "string",
        BackupMetas = new[]
        {
            new Volcengine.Rds_postgresql.Inputs.DataBackupBackupMetaArgs
            {
                DbName = "string",
            },
        },
        BackupMethod = "string",
        BackupScope = "string",
        BackupType = "string",
    });
    
    example, err := rds_postgresql.NewDataBackup(ctx, "dataBackupResource", &rds_postgresql.DataBackupArgs{
    	InstanceId:        pulumi.String("string"),
    	BackupDescription: pulumi.String("string"),
    	BackupMetas: rds_postgresql.DataBackupBackupMetaArray{
    		&rds_postgresql.DataBackupBackupMetaArgs{
    			DbName: pulumi.String("string"),
    		},
    	},
    	BackupMethod: pulumi.String("string"),
    	BackupScope:  pulumi.String("string"),
    	BackupType:   pulumi.String("string"),
    })
    
    var dataBackupResource = new DataBackup("dataBackupResource", DataBackupArgs.builder()
        .instanceId("string")
        .backupDescription("string")
        .backupMetas(DataBackupBackupMetaArgs.builder()
            .dbName("string")
            .build())
        .backupMethod("string")
        .backupScope("string")
        .backupType("string")
        .build());
    
    data_backup_resource = volcengine.rds_postgresql.DataBackup("dataBackupResource",
        instance_id="string",
        backup_description="string",
        backup_metas=[{
            "db_name": "string",
        }],
        backup_method="string",
        backup_scope="string",
        backup_type="string")
    
    const dataBackupResource = new volcengine.rds_postgresql.DataBackup("dataBackupResource", {
        instanceId: "string",
        backupDescription: "string",
        backupMetas: [{
            dbName: "string",
        }],
        backupMethod: "string",
        backupScope: "string",
        backupType: "string",
    });
    
    type: volcengine:rds_postgresql:DataBackup
    properties:
        backupDescription: string
        backupMetas:
            - dbName: string
        backupMethod: string
        backupScope: string
        backupType: string
        instanceId: string
    

    DataBackup 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 DataBackup resource accepts the following input properties:

    InstanceId string
    The id of the PostgreSQL instance.
    BackupDescription string
    The description of the backup set.
    BackupMetas List<DataBackupBackupMeta>
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    BackupMethod string
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    BackupScope string
    The scope of the backup: Instance, Database.
    BackupType string
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    InstanceId string
    The id of the PostgreSQL instance.
    BackupDescription string
    The description of the backup set.
    BackupMetas []DataBackupBackupMetaArgs
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    BackupMethod string
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    BackupScope string
    The scope of the backup: Instance, Database.
    BackupType string
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instanceId String
    The id of the PostgreSQL instance.
    backupDescription String
    The description of the backup set.
    backupMetas List<DataBackupBackupMeta>
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backupMethod String
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backupScope String
    The scope of the backup: Instance, Database.
    backupType String
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instanceId string
    The id of the PostgreSQL instance.
    backupDescription string
    The description of the backup set.
    backupMetas DataBackupBackupMeta[]
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backupMethod string
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backupScope string
    The scope of the backup: Instance, Database.
    backupType string
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instance_id str
    The id of the PostgreSQL instance.
    backup_description str
    The description of the backup set.
    backup_metas Sequence[DataBackupBackupMetaArgs]
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backup_method str
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backup_scope str
    The scope of the backup: Instance, Database.
    backup_type str
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instanceId String
    The id of the PostgreSQL instance.
    backupDescription String
    The description of the backup set.
    backupMetas List<Property Map>
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backupMethod String
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backupScope String
    The scope of the backup: Instance, Database.
    backupType String
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DataBackup resource produces the following output properties:

    BackupId string
    The id of the backup.
    Id string
    The provider-assigned unique ID for this managed resource.
    BackupId string
    The id of the backup.
    Id string
    The provider-assigned unique ID for this managed resource.
    backupId String
    The id of the backup.
    id String
    The provider-assigned unique ID for this managed resource.
    backupId string
    The id of the backup.
    id string
    The provider-assigned unique ID for this managed resource.
    backup_id str
    The id of the backup.
    id str
    The provider-assigned unique ID for this managed resource.
    backupId String
    The id of the backup.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DataBackup Resource

    Get an existing DataBackup 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?: DataBackupState, opts?: CustomResourceOptions): DataBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_description: Optional[str] = None,
            backup_id: Optional[str] = None,
            backup_metas: Optional[Sequence[DataBackupBackupMetaArgs]] = None,
            backup_method: Optional[str] = None,
            backup_scope: Optional[str] = None,
            backup_type: Optional[str] = None,
            instance_id: Optional[str] = None) -> DataBackup
    func GetDataBackup(ctx *Context, name string, id IDInput, state *DataBackupState, opts ...ResourceOption) (*DataBackup, error)
    public static DataBackup Get(string name, Input<string> id, DataBackupState? state, CustomResourceOptions? opts = null)
    public static DataBackup get(String name, Output<String> id, DataBackupState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:rds_postgresql:DataBackup    get:      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:
    BackupDescription string
    The description of the backup set.
    BackupId string
    The id of the backup.
    BackupMetas List<DataBackupBackupMeta>
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    BackupMethod string
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    BackupScope string
    The scope of the backup: Instance, Database.
    BackupType string
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    InstanceId string
    The id of the PostgreSQL instance.
    BackupDescription string
    The description of the backup set.
    BackupId string
    The id of the backup.
    BackupMetas []DataBackupBackupMetaArgs
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    BackupMethod string
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    BackupScope string
    The scope of the backup: Instance, Database.
    BackupType string
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    InstanceId string
    The id of the PostgreSQL instance.
    backupDescription String
    The description of the backup set.
    backupId String
    The id of the backup.
    backupMetas List<DataBackupBackupMeta>
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backupMethod String
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backupScope String
    The scope of the backup: Instance, Database.
    backupType String
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instanceId String
    The id of the PostgreSQL instance.
    backupDescription string
    The description of the backup set.
    backupId string
    The id of the backup.
    backupMetas DataBackupBackupMeta[]
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backupMethod string
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backupScope string
    The scope of the backup: Instance, Database.
    backupType string
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instanceId string
    The id of the PostgreSQL instance.
    backup_description str
    The description of the backup set.
    backup_id str
    The id of the backup.
    backup_metas Sequence[DataBackupBackupMetaArgs]
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backup_method str
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backup_scope str
    The scope of the backup: Instance, Database.
    backup_type str
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instance_id str
    The id of the PostgreSQL instance.
    backupDescription String
    The description of the backup set.
    backupId String
    The id of the backup.
    backupMetas List<Property Map>
    Specify the database that needs to be backed up. This parameter can only be set when the value of backup_scope is Database.
    backupMethod String
    The method of the backup: Physical, Logical.When the value of backup_scope is Database, the value of backup_method can only be Logical.
    backupScope String
    The scope of the backup: Instance, Database.
    backupType String
    The backup type of the backup: Full(default), Increment. Do not set this parameter when backup_method is Logical; otherwise, the creation will fail.
    instanceId String
    The id of the PostgreSQL instance.

    Supporting Types

    DataBackupBackupMeta, DataBackupBackupMetaArgs

    DbName string
    The name of the database.
    DbName string
    The name of the database.
    dbName String
    The name of the database.
    dbName string
    The name of the database.
    db_name str
    The name of the database.
    dbName String
    The name of the database.

    Import

    RdsPostgresqlDataBackup can be imported using the id, e.g.

    $ pulumi import volcengine:rds_postgresql/dataBackup:DataBackup default resource_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate