1. Packages
  2. Alicloud Provider
  3. API Docs
  4. hbr
  5. ServerBackupPlan
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.hbr.ServerBackupPlan

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a Hybrid Backup Recovery (HBR) Server Backup Plan resource.

    For information about Hybrid Backup Recovery (HBR) Server Backup Plan and how to use it, see What is Server Backup Plan.

    NOTE: Available in v1.142.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.getZones({
        availableResourceCreation: "Instance",
    });
    const exampleGetInstanceTypes = example.then(example => alicloud.ecs.getInstanceTypes({
        availabilityZone: example.zones?.[0]?.id,
        cpuCoreCount: 1,
        memorySize: 2,
    }));
    const exampleGetImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_18.*64",
        owners: "system",
    });
    const exampleNetwork = new alicloud.vpc.Network("example", {
        vpcName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
    });
    const exampleSwitch = new alicloud.vpc.Switch("example", {
        vswitchName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
        vpcId: exampleNetwork.id,
        zoneId: example.then(example => example.zones?.[0]?.id),
    });
    const exampleSecurityGroup = new alicloud.ecs.SecurityGroup("example", {
        name: "terraform-example",
        vpcId: exampleNetwork.id,
    });
    const exampleInstance = new alicloud.ecs.Instance("example", {
        imageId: exampleGetImages.then(exampleGetImages => exampleGetImages.images?.[0]?.id),
        instanceType: exampleGetInstanceTypes.then(exampleGetInstanceTypes => exampleGetInstanceTypes.instanceTypes?.[0]?.id),
        availabilityZone: example.then(example => example.zones?.[0]?.id),
        securityGroups: [exampleSecurityGroup.id],
        instanceName: "terraform-example",
        internetChargeType: "PayByBandwidth",
        vswitchId: exampleSwitch.id,
    });
    const exampleServerBackupPlan = new alicloud.hbr.ServerBackupPlan("example", {
        ecsServerBackupPlanName: "terraform-example",
        instanceId: exampleInstance.id,
        schedule: "I|1602673264|PT2H",
        retention: 1,
        details: [{
            appConsistent: true,
            snapshotGroup: true,
        }],
        disabled: false,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.get_zones(available_resource_creation="Instance")
    example_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=example.zones[0].id,
        cpu_core_count=1,
        memory_size=2)
    example_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
        owners="system")
    example_network = alicloud.vpc.Network("example",
        vpc_name="terraform-example",
        cidr_block="172.17.3.0/24")
    example_switch = alicloud.vpc.Switch("example",
        vswitch_name="terraform-example",
        cidr_block="172.17.3.0/24",
        vpc_id=example_network.id,
        zone_id=example.zones[0].id)
    example_security_group = alicloud.ecs.SecurityGroup("example",
        name="terraform-example",
        vpc_id=example_network.id)
    example_instance = alicloud.ecs.Instance("example",
        image_id=example_get_images.images[0].id,
        instance_type=example_get_instance_types.instance_types[0].id,
        availability_zone=example.zones[0].id,
        security_groups=[example_security_group.id],
        instance_name="terraform-example",
        internet_charge_type="PayByBandwidth",
        vswitch_id=example_switch.id)
    example_server_backup_plan = alicloud.hbr.ServerBackupPlan("example",
        ecs_server_backup_plan_name="terraform-example",
        instance_id=example_instance.id,
        schedule="I|1602673264|PT2H",
        retention=1,
        details=[{
            "app_consistent": True,
            "snapshot_group": True,
        }],
        disabled=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("Instance"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(example.Zones[0].Id),
    			CpuCoreCount:     pulumi.IntRef(1),
    			MemorySize:       pulumi.Float64Ref(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex: pulumi.StringRef("^ubuntu_18.*64"),
    			Owners:    pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleNetwork, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
    			VpcName:   pulumi.String("terraform-example"),
    			CidrBlock: pulumi.String("172.17.3.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSwitch, err := vpc.NewSwitch(ctx, "example", &vpc.SwitchArgs{
    			VswitchName: pulumi.String("terraform-example"),
    			CidrBlock:   pulumi.String("172.17.3.0/24"),
    			VpcId:       exampleNetwork.ID(),
    			ZoneId:      pulumi.String(example.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSecurityGroup, err := ecs.NewSecurityGroup(ctx, "example", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String("terraform-example"),
    			VpcId: exampleNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := ecs.NewInstance(ctx, "example", &ecs.InstanceArgs{
    			ImageId:          pulumi.String(exampleGetImages.Images[0].Id),
    			InstanceType:     pulumi.String(exampleGetInstanceTypes.InstanceTypes[0].Id),
    			AvailabilityZone: pulumi.String(example.Zones[0].Id),
    			SecurityGroups: pulumi.StringArray{
    				exampleSecurityGroup.ID(),
    			},
    			InstanceName:       pulumi.String("terraform-example"),
    			InternetChargeType: pulumi.String("PayByBandwidth"),
    			VswitchId:          exampleSwitch.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = hbr.NewServerBackupPlan(ctx, "example", &hbr.ServerBackupPlanArgs{
    			EcsServerBackupPlanName: pulumi.String("terraform-example"),
    			InstanceId:              exampleInstance.ID(),
    			Schedule:                pulumi.String("I|1602673264|PT2H"),
    			Retention:               pulumi.Int(1),
    			Details: hbr.ServerBackupPlanDetailArray{
    				&hbr.ServerBackupPlanDetailArgs{
    					AppConsistent: pulumi.Bool(true),
    					SnapshotGroup: pulumi.Bool(true),
    				},
    			},
    			Disabled: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "Instance",
        });
    
        var exampleGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = example.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            CpuCoreCount = 1,
            MemorySize = 2,
        });
    
        var exampleGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_18.*64",
            Owners = "system",
        });
    
        var exampleNetwork = new AliCloud.Vpc.Network("example", new()
        {
            VpcName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
        });
    
        var exampleSwitch = new AliCloud.Vpc.Switch("example", new()
        {
            VswitchName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
            VpcId = exampleNetwork.Id,
            ZoneId = example.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var exampleSecurityGroup = new AliCloud.Ecs.SecurityGroup("example", new()
        {
            Name = "terraform-example",
            VpcId = exampleNetwork.Id,
        });
    
        var exampleInstance = new AliCloud.Ecs.Instance("example", new()
        {
            ImageId = exampleGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = exampleGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            AvailabilityZone = example.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            SecurityGroups = new[]
            {
                exampleSecurityGroup.Id,
            },
            InstanceName = "terraform-example",
            InternetChargeType = "PayByBandwidth",
            VswitchId = exampleSwitch.Id,
        });
    
        var exampleServerBackupPlan = new AliCloud.Hbr.ServerBackupPlan("example", new()
        {
            EcsServerBackupPlanName = "terraform-example",
            InstanceId = exampleInstance.Id,
            Schedule = "I|1602673264|PT2H",
            Retention = 1,
            Details = new[]
            {
                new AliCloud.Hbr.Inputs.ServerBackupPlanDetailArgs
                {
                    AppConsistent = true,
                    SnapshotGroup = true,
                },
            },
            Disabled = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.hbr.ServerBackupPlan;
    import com.pulumi.alicloud.hbr.ServerBackupPlanArgs;
    import com.pulumi.alicloud.hbr.inputs.ServerBackupPlanDetailArgs;
    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 example = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("Instance")
                .build());
    
            final var exampleGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(example.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .cpuCoreCount(1)
                .memorySize(2)
                .build());
    
            final var exampleGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_18.*64")
                .owners("system")
                .build());
    
            var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
                .vpcName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .build());
    
            var exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()
                .vswitchName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .vpcId(exampleNetwork.id())
                .zoneId(example.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
                .name("terraform-example")
                .vpcId(exampleNetwork.id())
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                .imageId(exampleGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(exampleGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .availabilityZone(example.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .securityGroups(exampleSecurityGroup.id())
                .instanceName("terraform-example")
                .internetChargeType("PayByBandwidth")
                .vswitchId(exampleSwitch.id())
                .build());
    
            var exampleServerBackupPlan = new ServerBackupPlan("exampleServerBackupPlan", ServerBackupPlanArgs.builder()
                .ecsServerBackupPlanName("terraform-example")
                .instanceId(exampleInstance.id())
                .schedule("I|1602673264|PT2H")
                .retention(1)
                .details(ServerBackupPlanDetailArgs.builder()
                    .appConsistent(true)
                    .snapshotGroup(true)
                    .build())
                .disabled(false)
                .build());
    
        }
    }
    
    resources:
      exampleNetwork:
        type: alicloud:vpc:Network
        name: example
        properties:
          vpcName: terraform-example
          cidrBlock: 172.17.3.0/24
      exampleSwitch:
        type: alicloud:vpc:Switch
        name: example
        properties:
          vswitchName: terraform-example
          cidrBlock: 172.17.3.0/24
          vpcId: ${exampleNetwork.id}
          zoneId: ${example.zones[0].id}
      exampleSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: example
        properties:
          name: terraform-example
          vpcId: ${exampleNetwork.id}
      exampleInstance:
        type: alicloud:ecs:Instance
        name: example
        properties:
          imageId: ${exampleGetImages.images[0].id}
          instanceType: ${exampleGetInstanceTypes.instanceTypes[0].id}
          availabilityZone: ${example.zones[0].id}
          securityGroups:
            - ${exampleSecurityGroup.id}
          instanceName: terraform-example
          internetChargeType: PayByBandwidth
          vswitchId: ${exampleSwitch.id}
      exampleServerBackupPlan:
        type: alicloud:hbr:ServerBackupPlan
        name: example
        properties:
          ecsServerBackupPlanName: terraform-example
          instanceId: ${exampleInstance.id}
          schedule: I|1602673264|PT2H
          retention: 1
          details:
            - appConsistent: true
              snapshotGroup: true
          disabled: false
    variables:
      example:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: Instance
      exampleGetInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${example.zones[0].id}
            cpuCoreCount: 1
            memorySize: 2
      exampleGetImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_18.*64
            owners: system
    

    Create ServerBackupPlan Resource

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

    Constructor syntax

    new ServerBackupPlan(name: string, args: ServerBackupPlanArgs, opts?: CustomResourceOptions);
    @overload
    def ServerBackupPlan(resource_name: str,
                         args: ServerBackupPlanArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServerBackupPlan(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         details: Optional[Sequence[ServerBackupPlanDetailArgs]] = None,
                         ecs_server_backup_plan_name: Optional[str] = None,
                         instance_id: Optional[str] = None,
                         retention: Optional[int] = None,
                         schedule: Optional[str] = None,
                         cross_account_role_name: Optional[str] = None,
                         cross_account_type: Optional[str] = None,
                         cross_account_user_id: Optional[int] = None,
                         disabled: Optional[bool] = None)
    func NewServerBackupPlan(ctx *Context, name string, args ServerBackupPlanArgs, opts ...ResourceOption) (*ServerBackupPlan, error)
    public ServerBackupPlan(string name, ServerBackupPlanArgs args, CustomResourceOptions? opts = null)
    public ServerBackupPlan(String name, ServerBackupPlanArgs args)
    public ServerBackupPlan(String name, ServerBackupPlanArgs args, CustomResourceOptions options)
    
    type: alicloud:hbr:ServerBackupPlan
    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 ServerBackupPlanArgs
    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 ServerBackupPlanArgs
    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 ServerBackupPlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerBackupPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServerBackupPlanArgs
    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 serverBackupPlanResource = new AliCloud.Hbr.ServerBackupPlan("serverBackupPlanResource", new()
    {
        Details = new[]
        {
            new AliCloud.Hbr.Inputs.ServerBackupPlanDetailArgs
            {
                AppConsistent = false,
                SnapshotGroup = false,
                DestinationRegionId = "string",
                DestinationRetention = 0,
                DiskIdLists = new[]
                {
                    "string",
                },
                DoCopy = false,
                EnableFsFreeze = false,
                PostScriptPath = "string",
                PreScriptPath = "string",
                TimeoutInSeconds = 0,
            },
        },
        EcsServerBackupPlanName = "string",
        InstanceId = "string",
        Retention = 0,
        Schedule = "string",
        CrossAccountRoleName = "string",
        CrossAccountType = "string",
        CrossAccountUserId = 0,
        Disabled = false,
    });
    
    example, err := hbr.NewServerBackupPlan(ctx, "serverBackupPlanResource", &hbr.ServerBackupPlanArgs{
    	Details: hbr.ServerBackupPlanDetailArray{
    		&hbr.ServerBackupPlanDetailArgs{
    			AppConsistent:        pulumi.Bool(false),
    			SnapshotGroup:        pulumi.Bool(false),
    			DestinationRegionId:  pulumi.String("string"),
    			DestinationRetention: pulumi.Int(0),
    			DiskIdLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			DoCopy:           pulumi.Bool(false),
    			EnableFsFreeze:   pulumi.Bool(false),
    			PostScriptPath:   pulumi.String("string"),
    			PreScriptPath:    pulumi.String("string"),
    			TimeoutInSeconds: pulumi.Int(0),
    		},
    	},
    	EcsServerBackupPlanName: pulumi.String("string"),
    	InstanceId:              pulumi.String("string"),
    	Retention:               pulumi.Int(0),
    	Schedule:                pulumi.String("string"),
    	CrossAccountRoleName:    pulumi.String("string"),
    	CrossAccountType:        pulumi.String("string"),
    	CrossAccountUserId:      pulumi.Int(0),
    	Disabled:                pulumi.Bool(false),
    })
    
    var serverBackupPlanResource = new ServerBackupPlan("serverBackupPlanResource", ServerBackupPlanArgs.builder()
        .details(ServerBackupPlanDetailArgs.builder()
            .appConsistent(false)
            .snapshotGroup(false)
            .destinationRegionId("string")
            .destinationRetention(0)
            .diskIdLists("string")
            .doCopy(false)
            .enableFsFreeze(false)
            .postScriptPath("string")
            .preScriptPath("string")
            .timeoutInSeconds(0)
            .build())
        .ecsServerBackupPlanName("string")
        .instanceId("string")
        .retention(0)
        .schedule("string")
        .crossAccountRoleName("string")
        .crossAccountType("string")
        .crossAccountUserId(0)
        .disabled(false)
        .build());
    
    server_backup_plan_resource = alicloud.hbr.ServerBackupPlan("serverBackupPlanResource",
        details=[alicloud.hbr.ServerBackupPlanDetailArgs(
            app_consistent=False,
            snapshot_group=False,
            destination_region_id="string",
            destination_retention=0,
            disk_id_lists=["string"],
            do_copy=False,
            enable_fs_freeze=False,
            post_script_path="string",
            pre_script_path="string",
            timeout_in_seconds=0,
        )],
        ecs_server_backup_plan_name="string",
        instance_id="string",
        retention=0,
        schedule="string",
        cross_account_role_name="string",
        cross_account_type="string",
        cross_account_user_id=0,
        disabled=False)
    
    const serverBackupPlanResource = new alicloud.hbr.ServerBackupPlan("serverBackupPlanResource", {
        details: [{
            appConsistent: false,
            snapshotGroup: false,
            destinationRegionId: "string",
            destinationRetention: 0,
            diskIdLists: ["string"],
            doCopy: false,
            enableFsFreeze: false,
            postScriptPath: "string",
            preScriptPath: "string",
            timeoutInSeconds: 0,
        }],
        ecsServerBackupPlanName: "string",
        instanceId: "string",
        retention: 0,
        schedule: "string",
        crossAccountRoleName: "string",
        crossAccountType: "string",
        crossAccountUserId: 0,
        disabled: false,
    });
    
    type: alicloud:hbr:ServerBackupPlan
    properties:
        crossAccountRoleName: string
        crossAccountType: string
        crossAccountUserId: 0
        details:
            - appConsistent: false
              destinationRegionId: string
              destinationRetention: 0
              diskIdLists:
                - string
              doCopy: false
              enableFsFreeze: false
              postScriptPath: string
              preScriptPath: string
              snapshotGroup: false
              timeoutInSeconds: 0
        disabled: false
        ecsServerBackupPlanName: string
        instanceId: string
        retention: 0
        schedule: string
    

    ServerBackupPlan Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ServerBackupPlan resource accepts the following input properties:

    Details List<Pulumi.AliCloud.Hbr.Inputs.ServerBackupPlanDetail>
    ECS server backup plan details.
    EcsServerBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    InstanceId string
    The ID of ECS instance.
    Retention int
    Backup retention days, the minimum is 1.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false.
    Details []ServerBackupPlanDetailArgs
    ECS server backup plan details.
    EcsServerBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    InstanceId string
    The ID of ECS instance.
    Retention int
    Backup retention days, the minimum is 1.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false.
    details List<ServerBackupPlanDetail>
    ECS server backup plan details.
    ecsServerBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instanceId String
    The ID of ECS instance.
    retention Integer
    Backup retention days, the minimum is 1.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Integer
    The original account ID of the cross account backup managed by the current account.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false.
    details ServerBackupPlanDetail[]
    ECS server backup plan details.
    ecsServerBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instanceId string
    The ID of ECS instance.
    retention number
    Backup retention days, the minimum is 1.
    schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    crossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId number
    The original account ID of the cross account backup managed by the current account.
    disabled boolean
    Whether to disable the backup task. Valid values: true, false.
    details Sequence[ServerBackupPlanDetailArgs]
    ECS server backup plan details.
    ecs_server_backup_plan_name str
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instance_id str
    The ID of ECS instance.
    retention int
    Backup retention days, the minimum is 1.
    schedule str
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    cross_account_role_name str
    The role name created in the original account RAM backup by the cross account managed by the current account.
    cross_account_type str
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    cross_account_user_id int
    The original account ID of the cross account backup managed by the current account.
    disabled bool
    Whether to disable the backup task. Valid values: true, false.
    details List<Property Map>
    ECS server backup plan details.
    ecsServerBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instanceId String
    The ID of ECS instance.
    retention Number
    Backup retention days, the minimum is 1.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Number
    The original account ID of the cross account backup managed by the current account.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServerBackupPlan 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 ServerBackupPlan Resource

    Get an existing ServerBackupPlan 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?: ServerBackupPlanState, opts?: CustomResourceOptions): ServerBackupPlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cross_account_role_name: Optional[str] = None,
            cross_account_type: Optional[str] = None,
            cross_account_user_id: Optional[int] = None,
            details: Optional[Sequence[ServerBackupPlanDetailArgs]] = None,
            disabled: Optional[bool] = None,
            ecs_server_backup_plan_name: Optional[str] = None,
            instance_id: Optional[str] = None,
            retention: Optional[int] = None,
            schedule: Optional[str] = None) -> ServerBackupPlan
    func GetServerBackupPlan(ctx *Context, name string, id IDInput, state *ServerBackupPlanState, opts ...ResourceOption) (*ServerBackupPlan, error)
    public static ServerBackupPlan Get(string name, Input<string> id, ServerBackupPlanState? state, CustomResourceOptions? opts = null)
    public static ServerBackupPlan get(String name, Output<String> id, ServerBackupPlanState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Details List<Pulumi.AliCloud.Hbr.Inputs.ServerBackupPlanDetail>
    ECS server backup plan details.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false.
    EcsServerBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    InstanceId string
    The ID of ECS instance.
    Retention int
    Backup retention days, the minimum is 1.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Details []ServerBackupPlanDetailArgs
    ECS server backup plan details.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false.
    EcsServerBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    InstanceId string
    The ID of ECS instance.
    Retention int
    Backup retention days, the minimum is 1.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Integer
    The original account ID of the cross account backup managed by the current account.
    details List<ServerBackupPlanDetail>
    ECS server backup plan details.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false.
    ecsServerBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instanceId String
    The ID of ECS instance.
    retention Integer
    Backup retention days, the minimum is 1.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    crossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId number
    The original account ID of the cross account backup managed by the current account.
    details ServerBackupPlanDetail[]
    ECS server backup plan details.
    disabled boolean
    Whether to disable the backup task. Valid values: true, false.
    ecsServerBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instanceId string
    The ID of ECS instance.
    retention number
    Backup retention days, the minimum is 1.
    schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    cross_account_role_name str
    The role name created in the original account RAM backup by the cross account managed by the current account.
    cross_account_type str
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    cross_account_user_id int
    The original account ID of the cross account backup managed by the current account.
    details Sequence[ServerBackupPlanDetailArgs]
    ECS server backup plan details.
    disabled bool
    Whether to disable the backup task. Valid values: true, false.
    ecs_server_backup_plan_name str
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instance_id str
    The ID of ECS instance.
    retention int
    Backup retention days, the minimum is 1.
    schedule str
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Number
    The original account ID of the cross account backup managed by the current account.
    details List<Property Map>
    ECS server backup plan details.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false.
    ecsServerBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    instanceId String
    The ID of ECS instance.
    retention Number
    Backup retention days, the minimum is 1.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}

    • startTime Backup start time, UNIX time, in seconds.

    Supporting Types

    ServerBackupPlanDetail, ServerBackupPlanDetailArgs

    AppConsistent bool
    Whether to turn on application consistency. The application consistency snapshot backs up memory data and ongoing database transactions at the time of snapshot creation to ensure the consistency of application system data and database transactions. By applying consistent snapshots, there is no data damage or loss, so as to avoid log rollback during database startup and ensure that the application is in a consistent startup state. Valid values: true, false.
    SnapshotGroup bool
    Whether to turn on file system consistency. If SnapshotGroup is true, when AppConsistent is true but the relevant conditions are not met or AppConsistent is false, the resulting snapshot will be a file system consistency snapshot. The file system consistency ensures that the file system memory and disk information are synchronized at the time of snapshot creation, and the file system write operation is frozen to make the file system in a consistent state. The file system consistency snapshot can prevent the operating system from performing disk inspection and repair operations such as CHKDSK or fsck after restart. Valid values: true, false.
    DestinationRegionId string
    Only vaild when DoCopy is true. The destination region ID when replicating to another region. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    DestinationRetention int
    Only vaild when DoCopy is true. The retention days of the destination backup. When not specified, the destination backup will be saved permanently. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    DiskIdLists List<string>
    The list of cloud disks to be backed up in the ECS instance. When not specified, a snapshot is executed for all the disks on the ECS instance.
    DoCopy bool
    Whether replicate to another region. Valid values: true, false.
    EnableFsFreeze bool
    Only the Linux system is valid. Whether to use the Linux FsFreeze mechanism to ensure that the file system is read-only consistent before creating a storage snapshot. The default is True. Valid values: true, false.
    PostScriptPath string
    Only vaild for the linux system when AppConsistent is true. The application thaw script path (e.g. /tmp/postscript.sh). The postscript.sh script must meet the following conditions: in terms of permissions, only the root user as the owner has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    PreScriptPath string
    Only vaild for the linux system when AppConsistent is true. Apply the freeze script path (e.g. /tmp/prescript.sh). prescript.sh scripts must meet the following conditions: in terms of permissions, only root, as the owner, has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    TimeoutInSeconds int
    Only the Linux system is valid, and the IO freeze timeout period. The default is 30 seconds.
    AppConsistent bool
    Whether to turn on application consistency. The application consistency snapshot backs up memory data and ongoing database transactions at the time of snapshot creation to ensure the consistency of application system data and database transactions. By applying consistent snapshots, there is no data damage or loss, so as to avoid log rollback during database startup and ensure that the application is in a consistent startup state. Valid values: true, false.
    SnapshotGroup bool
    Whether to turn on file system consistency. If SnapshotGroup is true, when AppConsistent is true but the relevant conditions are not met or AppConsistent is false, the resulting snapshot will be a file system consistency snapshot. The file system consistency ensures that the file system memory and disk information are synchronized at the time of snapshot creation, and the file system write operation is frozen to make the file system in a consistent state. The file system consistency snapshot can prevent the operating system from performing disk inspection and repair operations such as CHKDSK or fsck after restart. Valid values: true, false.
    DestinationRegionId string
    Only vaild when DoCopy is true. The destination region ID when replicating to another region. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    DestinationRetention int
    Only vaild when DoCopy is true. The retention days of the destination backup. When not specified, the destination backup will be saved permanently. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    DiskIdLists []string
    The list of cloud disks to be backed up in the ECS instance. When not specified, a snapshot is executed for all the disks on the ECS instance.
    DoCopy bool
    Whether replicate to another region. Valid values: true, false.
    EnableFsFreeze bool
    Only the Linux system is valid. Whether to use the Linux FsFreeze mechanism to ensure that the file system is read-only consistent before creating a storage snapshot. The default is True. Valid values: true, false.
    PostScriptPath string
    Only vaild for the linux system when AppConsistent is true. The application thaw script path (e.g. /tmp/postscript.sh). The postscript.sh script must meet the following conditions: in terms of permissions, only the root user as the owner has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    PreScriptPath string
    Only vaild for the linux system when AppConsistent is true. Apply the freeze script path (e.g. /tmp/prescript.sh). prescript.sh scripts must meet the following conditions: in terms of permissions, only root, as the owner, has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    TimeoutInSeconds int
    Only the Linux system is valid, and the IO freeze timeout period. The default is 30 seconds.
    appConsistent Boolean
    Whether to turn on application consistency. The application consistency snapshot backs up memory data and ongoing database transactions at the time of snapshot creation to ensure the consistency of application system data and database transactions. By applying consistent snapshots, there is no data damage or loss, so as to avoid log rollback during database startup and ensure that the application is in a consistent startup state. Valid values: true, false.
    snapshotGroup Boolean
    Whether to turn on file system consistency. If SnapshotGroup is true, when AppConsistent is true but the relevant conditions are not met or AppConsistent is false, the resulting snapshot will be a file system consistency snapshot. The file system consistency ensures that the file system memory and disk information are synchronized at the time of snapshot creation, and the file system write operation is frozen to make the file system in a consistent state. The file system consistency snapshot can prevent the operating system from performing disk inspection and repair operations such as CHKDSK or fsck after restart. Valid values: true, false.
    destinationRegionId String
    Only vaild when DoCopy is true. The destination region ID when replicating to another region. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    destinationRetention Integer
    Only vaild when DoCopy is true. The retention days of the destination backup. When not specified, the destination backup will be saved permanently. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    diskIdLists List<String>
    The list of cloud disks to be backed up in the ECS instance. When not specified, a snapshot is executed for all the disks on the ECS instance.
    doCopy Boolean
    Whether replicate to another region. Valid values: true, false.
    enableFsFreeze Boolean
    Only the Linux system is valid. Whether to use the Linux FsFreeze mechanism to ensure that the file system is read-only consistent before creating a storage snapshot. The default is True. Valid values: true, false.
    postScriptPath String
    Only vaild for the linux system when AppConsistent is true. The application thaw script path (e.g. /tmp/postscript.sh). The postscript.sh script must meet the following conditions: in terms of permissions, only the root user as the owner has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    preScriptPath String
    Only vaild for the linux system when AppConsistent is true. Apply the freeze script path (e.g. /tmp/prescript.sh). prescript.sh scripts must meet the following conditions: in terms of permissions, only root, as the owner, has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    timeoutInSeconds Integer
    Only the Linux system is valid, and the IO freeze timeout period. The default is 30 seconds.
    appConsistent boolean
    Whether to turn on application consistency. The application consistency snapshot backs up memory data and ongoing database transactions at the time of snapshot creation to ensure the consistency of application system data and database transactions. By applying consistent snapshots, there is no data damage or loss, so as to avoid log rollback during database startup and ensure that the application is in a consistent startup state. Valid values: true, false.
    snapshotGroup boolean
    Whether to turn on file system consistency. If SnapshotGroup is true, when AppConsistent is true but the relevant conditions are not met or AppConsistent is false, the resulting snapshot will be a file system consistency snapshot. The file system consistency ensures that the file system memory and disk information are synchronized at the time of snapshot creation, and the file system write operation is frozen to make the file system in a consistent state. The file system consistency snapshot can prevent the operating system from performing disk inspection and repair operations such as CHKDSK or fsck after restart. Valid values: true, false.
    destinationRegionId string
    Only vaild when DoCopy is true. The destination region ID when replicating to another region. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    destinationRetention number
    Only vaild when DoCopy is true. The retention days of the destination backup. When not specified, the destination backup will be saved permanently. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    diskIdLists string[]
    The list of cloud disks to be backed up in the ECS instance. When not specified, a snapshot is executed for all the disks on the ECS instance.
    doCopy boolean
    Whether replicate to another region. Valid values: true, false.
    enableFsFreeze boolean
    Only the Linux system is valid. Whether to use the Linux FsFreeze mechanism to ensure that the file system is read-only consistent before creating a storage snapshot. The default is True. Valid values: true, false.
    postScriptPath string
    Only vaild for the linux system when AppConsistent is true. The application thaw script path (e.g. /tmp/postscript.sh). The postscript.sh script must meet the following conditions: in terms of permissions, only the root user as the owner has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    preScriptPath string
    Only vaild for the linux system when AppConsistent is true. Apply the freeze script path (e.g. /tmp/prescript.sh). prescript.sh scripts must meet the following conditions: in terms of permissions, only root, as the owner, has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    timeoutInSeconds number
    Only the Linux system is valid, and the IO freeze timeout period. The default is 30 seconds.
    app_consistent bool
    Whether to turn on application consistency. The application consistency snapshot backs up memory data and ongoing database transactions at the time of snapshot creation to ensure the consistency of application system data and database transactions. By applying consistent snapshots, there is no data damage or loss, so as to avoid log rollback during database startup and ensure that the application is in a consistent startup state. Valid values: true, false.
    snapshot_group bool
    Whether to turn on file system consistency. If SnapshotGroup is true, when AppConsistent is true but the relevant conditions are not met or AppConsistent is false, the resulting snapshot will be a file system consistency snapshot. The file system consistency ensures that the file system memory and disk information are synchronized at the time of snapshot creation, and the file system write operation is frozen to make the file system in a consistent state. The file system consistency snapshot can prevent the operating system from performing disk inspection and repair operations such as CHKDSK or fsck after restart. Valid values: true, false.
    destination_region_id str
    Only vaild when DoCopy is true. The destination region ID when replicating to another region. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    destination_retention int
    Only vaild when DoCopy is true. The retention days of the destination backup. When not specified, the destination backup will be saved permanently. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    disk_id_lists Sequence[str]
    The list of cloud disks to be backed up in the ECS instance. When not specified, a snapshot is executed for all the disks on the ECS instance.
    do_copy bool
    Whether replicate to another region. Valid values: true, false.
    enable_fs_freeze bool
    Only the Linux system is valid. Whether to use the Linux FsFreeze mechanism to ensure that the file system is read-only consistent before creating a storage snapshot. The default is True. Valid values: true, false.
    post_script_path str
    Only vaild for the linux system when AppConsistent is true. The application thaw script path (e.g. /tmp/postscript.sh). The postscript.sh script must meet the following conditions: in terms of permissions, only the root user as the owner has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    pre_script_path str
    Only vaild for the linux system when AppConsistent is true. Apply the freeze script path (e.g. /tmp/prescript.sh). prescript.sh scripts must meet the following conditions: in terms of permissions, only root, as the owner, has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    timeout_in_seconds int
    Only the Linux system is valid, and the IO freeze timeout period. The default is 30 seconds.
    appConsistent Boolean
    Whether to turn on application consistency. The application consistency snapshot backs up memory data and ongoing database transactions at the time of snapshot creation to ensure the consistency of application system data and database transactions. By applying consistent snapshots, there is no data damage or loss, so as to avoid log rollback during database startup and ensure that the application is in a consistent startup state. Valid values: true, false.
    snapshotGroup Boolean
    Whether to turn on file system consistency. If SnapshotGroup is true, when AppConsistent is true but the relevant conditions are not met or AppConsistent is false, the resulting snapshot will be a file system consistency snapshot. The file system consistency ensures that the file system memory and disk information are synchronized at the time of snapshot creation, and the file system write operation is frozen to make the file system in a consistent state. The file system consistency snapshot can prevent the operating system from performing disk inspection and repair operations such as CHKDSK or fsck after restart. Valid values: true, false.
    destinationRegionId String
    Only vaild when DoCopy is true. The destination region ID when replicating to another region. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    destinationRetention Number
    Only vaild when DoCopy is true. The retention days of the destination backup. When not specified, the destination backup will be saved permanently. Note: Once you set a value of this property, you cannot set it to an empty string anymore.
    diskIdLists List<String>
    The list of cloud disks to be backed up in the ECS instance. When not specified, a snapshot is executed for all the disks on the ECS instance.
    doCopy Boolean
    Whether replicate to another region. Valid values: true, false.
    enableFsFreeze Boolean
    Only the Linux system is valid. Whether to use the Linux FsFreeze mechanism to ensure that the file system is read-only consistent before creating a storage snapshot. The default is True. Valid values: true, false.
    postScriptPath String
    Only vaild for the linux system when AppConsistent is true. The application thaw script path (e.g. /tmp/postscript.sh). The postscript.sh script must meet the following conditions: in terms of permissions, only the root user as the owner has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    preScriptPath String
    Only vaild for the linux system when AppConsistent is true. Apply the freeze script path (e.g. /tmp/prescript.sh). prescript.sh scripts must meet the following conditions: in terms of permissions, only root, as the owner, has read, write, and execute permissions, that is, 700 permissions. In terms of content, the script content needs to be customized according to the application itself. This indicates that this parameter must be set when creating an application consistency snapshot for a Linux instance. If the script is set incorrectly (for example, permissions, save path, or file name are set incorrectly), the resulting snapshot is a file system consistency snapshot.
    timeoutInSeconds Number
    Only the Linux system is valid, and the IO freeze timeout period. The default is 30 seconds.

    Import

    Hybrid Backup Recovery (HBR) Server Backup Plan can be imported using the id, e.g.

    $ pulumi import alicloud:hbr/serverBackupPlan:ServerBackupPlan example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi