1. Packages
  2. Volcengine
  3. API Docs
  4. rds_postgresql
  5. RestoreBackup
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 restore backup

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const example = new volcengine.rds_postgresql.RestoreBackup("example", {
        backupId: "20251214-200431-0698LD",
        databases: [{
            dbName: "test",
            newDbName: "test_restored",
        }],
        sourceDbInstanceId: "postgres-72715e0d9f58",
        targetDbInstanceAccount: "super",
        targetDbInstanceId: "postgres-72715e0d9f58",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    example = volcengine.rds_postgresql.RestoreBackup("example",
        backup_id="20251214-200431-0698LD",
        databases=[volcengine.rds_postgresql.RestoreBackupDatabaseArgs(
            db_name="test",
            new_db_name="test_restored",
        )],
        source_db_instance_id="postgres-72715e0d9f58",
        target_db_instance_account="super",
        target_db_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.NewRestoreBackup(ctx, "example", &rds_postgresql.RestoreBackupArgs{
    			BackupId: pulumi.String("20251214-200431-0698LD"),
    			Databases: rds_postgresql.RestoreBackupDatabaseArray{
    				&rds_postgresql.RestoreBackupDatabaseArgs{
    					DbName:    pulumi.String("test"),
    					NewDbName: pulumi.String("test_restored"),
    				},
    			},
    			SourceDbInstanceId:      pulumi.String("postgres-72715e0d9f58"),
    			TargetDbInstanceAccount: pulumi.String("super"),
    			TargetDbInstanceId:      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.RestoreBackup("example", new()
        {
            BackupId = "20251214-200431-0698LD",
            Databases = new[]
            {
                new Volcengine.Rds_postgresql.Inputs.RestoreBackupDatabaseArgs
                {
                    DbName = "test",
                    NewDbName = "test_restored",
                },
            },
            SourceDbInstanceId = "postgres-72715e0d9f58",
            TargetDbInstanceAccount = "super",
            TargetDbInstanceId = "postgres-72715e0d9f58",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.rds_postgresql.RestoreBackup;
    import com.pulumi.volcengine.rds_postgresql.RestoreBackupArgs;
    import com.pulumi.volcengine.rds_postgresql.inputs.RestoreBackupDatabaseArgs;
    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 RestoreBackup("example", RestoreBackupArgs.builder()        
                .backupId("20251214-200431-0698LD")
                .databases(RestoreBackupDatabaseArgs.builder()
                    .dbName("test")
                    .newDbName("test_restored")
                    .build())
                .sourceDbInstanceId("postgres-72715e0d9f58")
                .targetDbInstanceAccount("super")
                .targetDbInstanceId("postgres-72715e0d9f58")
                .build());
    
        }
    }
    
    resources:
      example:
        type: volcengine:rds_postgresql:RestoreBackup
        properties:
          backupId: 20251214-200431-0698LD
          databases:
            - dbName: test
              newDbName: test_restored
          sourceDbInstanceId: postgres-72715e0d9f58
          targetDbInstanceAccount: super
          targetDbInstanceId: postgres-72715e0d9f58
    

    Create RestoreBackup Resource

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

    Constructor syntax

    new RestoreBackup(name: string, args: RestoreBackupArgs, opts?: CustomResourceOptions);
    @overload
    def RestoreBackup(resource_name: str,
                      args: RestoreBackupArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def RestoreBackup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      backup_id: Optional[str] = None,
                      databases: Optional[Sequence[RestoreBackupDatabaseArgs]] = None,
                      source_db_instance_id: Optional[str] = None,
                      target_db_instance_account: Optional[str] = None,
                      target_db_instance_id: Optional[str] = None)
    func NewRestoreBackup(ctx *Context, name string, args RestoreBackupArgs, opts ...ResourceOption) (*RestoreBackup, error)
    public RestoreBackup(string name, RestoreBackupArgs args, CustomResourceOptions? opts = null)
    public RestoreBackup(String name, RestoreBackupArgs args)
    public RestoreBackup(String name, RestoreBackupArgs args, CustomResourceOptions options)
    
    type: volcengine:rds_postgresql:RestoreBackup
    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 RestoreBackupArgs
    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 RestoreBackupArgs
    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 RestoreBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RestoreBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RestoreBackupArgs
    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 restoreBackupResource = new Volcengine.Rds_postgresql.RestoreBackup("restoreBackupResource", new()
    {
        BackupId = "string",
        Databases = new[]
        {
            new Volcengine.Rds_postgresql.Inputs.RestoreBackupDatabaseArgs
            {
                DbName = "string",
                NewDbName = "string",
            },
        },
        SourceDbInstanceId = "string",
        TargetDbInstanceAccount = "string",
        TargetDbInstanceId = "string",
    });
    
    example, err := rds_postgresql.NewRestoreBackup(ctx, "restoreBackupResource", &rds_postgresql.RestoreBackupArgs{
    	BackupId: pulumi.String("string"),
    	Databases: rds_postgresql.RestoreBackupDatabaseArray{
    		&rds_postgresql.RestoreBackupDatabaseArgs{
    			DbName:    pulumi.String("string"),
    			NewDbName: pulumi.String("string"),
    		},
    	},
    	SourceDbInstanceId:      pulumi.String("string"),
    	TargetDbInstanceAccount: pulumi.String("string"),
    	TargetDbInstanceId:      pulumi.String("string"),
    })
    
    var restoreBackupResource = new RestoreBackup("restoreBackupResource", RestoreBackupArgs.builder()
        .backupId("string")
        .databases(RestoreBackupDatabaseArgs.builder()
            .dbName("string")
            .newDbName("string")
            .build())
        .sourceDbInstanceId("string")
        .targetDbInstanceAccount("string")
        .targetDbInstanceId("string")
        .build());
    
    restore_backup_resource = volcengine.rds_postgresql.RestoreBackup("restoreBackupResource",
        backup_id="string",
        databases=[{
            "db_name": "string",
            "new_db_name": "string",
        }],
        source_db_instance_id="string",
        target_db_instance_account="string",
        target_db_instance_id="string")
    
    const restoreBackupResource = new volcengine.rds_postgresql.RestoreBackup("restoreBackupResource", {
        backupId: "string",
        databases: [{
            dbName: "string",
            newDbName: "string",
        }],
        sourceDbInstanceId: "string",
        targetDbInstanceAccount: "string",
        targetDbInstanceId: "string",
    });
    
    type: volcengine:rds_postgresql:RestoreBackup
    properties:
        backupId: string
        databases:
            - dbName: string
              newDbName: string
        sourceDbInstanceId: string
        targetDbInstanceAccount: string
        targetDbInstanceId: string
    

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

    BackupId string
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    Databases List<RestoreBackupDatabase>
    Information of the database to be restored.
    SourceDbInstanceId string
    The ID of the instance to which the backup belongs.
    TargetDbInstanceAccount string
    The account used as the Owner of the newly restored database in the target instance.
    TargetDbInstanceId string
    The ID of the target instance for restore.
    BackupId string
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    Databases []RestoreBackupDatabaseArgs
    Information of the database to be restored.
    SourceDbInstanceId string
    The ID of the instance to which the backup belongs.
    TargetDbInstanceAccount string
    The account used as the Owner of the newly restored database in the target instance.
    TargetDbInstanceId string
    The ID of the target instance for restore.
    backupId String
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases List<RestoreBackupDatabase>
    Information of the database to be restored.
    sourceDbInstanceId String
    The ID of the instance to which the backup belongs.
    targetDbInstanceAccount String
    The account used as the Owner of the newly restored database in the target instance.
    targetDbInstanceId String
    The ID of the target instance for restore.
    backupId string
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases RestoreBackupDatabase[]
    Information of the database to be restored.
    sourceDbInstanceId string
    The ID of the instance to which the backup belongs.
    targetDbInstanceAccount string
    The account used as the Owner of the newly restored database in the target instance.
    targetDbInstanceId string
    The ID of the target instance for restore.
    backup_id str
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases Sequence[RestoreBackupDatabaseArgs]
    Information of the database to be restored.
    source_db_instance_id str
    The ID of the instance to which the backup belongs.
    target_db_instance_account str
    The account used as the Owner of the newly restored database in the target instance.
    target_db_instance_id str
    The ID of the target instance for restore.
    backupId String
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases List<Property Map>
    Information of the database to be restored.
    sourceDbInstanceId String
    The ID of the instance to which the backup belongs.
    targetDbInstanceAccount String
    The account used as the Owner of the newly restored database in the target instance.
    targetDbInstanceId String
    The ID of the target instance for restore.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RestoreBackup Resource

    Get an existing RestoreBackup 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?: RestoreBackupState, opts?: CustomResourceOptions): RestoreBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_id: Optional[str] = None,
            databases: Optional[Sequence[RestoreBackupDatabaseArgs]] = None,
            source_db_instance_id: Optional[str] = None,
            target_db_instance_account: Optional[str] = None,
            target_db_instance_id: Optional[str] = None) -> RestoreBackup
    func GetRestoreBackup(ctx *Context, name string, id IDInput, state *RestoreBackupState, opts ...ResourceOption) (*RestoreBackup, error)
    public static RestoreBackup Get(string name, Input<string> id, RestoreBackupState? state, CustomResourceOptions? opts = null)
    public static RestoreBackup get(String name, Output<String> id, RestoreBackupState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:rds_postgresql:RestoreBackup    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:
    BackupId string
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    Databases List<RestoreBackupDatabase>
    Information of the database to be restored.
    SourceDbInstanceId string
    The ID of the instance to which the backup belongs.
    TargetDbInstanceAccount string
    The account used as the Owner of the newly restored database in the target instance.
    TargetDbInstanceId string
    The ID of the target instance for restore.
    BackupId string
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    Databases []RestoreBackupDatabaseArgs
    Information of the database to be restored.
    SourceDbInstanceId string
    The ID of the instance to which the backup belongs.
    TargetDbInstanceAccount string
    The account used as the Owner of the newly restored database in the target instance.
    TargetDbInstanceId string
    The ID of the target instance for restore.
    backupId String
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases List<RestoreBackupDatabase>
    Information of the database to be restored.
    sourceDbInstanceId String
    The ID of the instance to which the backup belongs.
    targetDbInstanceAccount String
    The account used as the Owner of the newly restored database in the target instance.
    targetDbInstanceId String
    The ID of the target instance for restore.
    backupId string
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases RestoreBackupDatabase[]
    Information of the database to be restored.
    sourceDbInstanceId string
    The ID of the instance to which the backup belongs.
    targetDbInstanceAccount string
    The account used as the Owner of the newly restored database in the target instance.
    targetDbInstanceId string
    The ID of the target instance for restore.
    backup_id str
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases Sequence[RestoreBackupDatabaseArgs]
    Information of the database to be restored.
    source_db_instance_id str
    The ID of the instance to which the backup belongs.
    target_db_instance_account str
    The account used as the Owner of the newly restored database in the target instance.
    target_db_instance_id str
    The ID of the target instance for restore.
    backupId String
    The backup ID used for restore.Only supports restoring data to an existing instance through logical backup.
    databases List<Property Map>
    Information of the database to be restored.
    sourceDbInstanceId String
    The ID of the instance to which the backup belongs.
    targetDbInstanceAccount String
    The account used as the Owner of the newly restored database in the target instance.
    targetDbInstanceId String
    The ID of the target instance for restore.

    Supporting Types

    RestoreBackupDatabase, RestoreBackupDatabaseArgs

    DbName string
    Original database name.
    NewDbName string
    New database name.
    DbName string
    Original database name.
    NewDbName string
    New database name.
    dbName String
    Original database name.
    newDbName String
    New database name.
    dbName string
    Original database name.
    newDbName string
    New database name.
    db_name str
    Original database name.
    new_db_name str
    New database name.
    dbName String
    Original database name.
    newDbName String
    New database name.

    Import

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

    $ pulumi import volcengine:rds_postgresql/restoreBackup:RestoreBackup 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