Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

ServerBackupPlan

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

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.Ecs.GetInstances.InvokeAsync(new AliCloud.Ecs.GetInstancesArgs
        {
            NameRegex = "no-deleteing-hbr-ecs-server-backup-plan",
            Status = "Running",
        }));
        var example = new AliCloud.Hbr.ServerBackupPlan("example", new AliCloud.Hbr.ServerBackupPlanArgs
        {
            EcsServerBackupPlanName = "server_backup_plan",
            InstanceId = @default.Apply(@default => @default.Instances?[0]?.Id),
            Schedule = "I|1602673264|PT2H",
            Retention = 1,
            Details = 
            {
                new AliCloud.Hbr.Inputs.ServerBackupPlanDetailArgs
                {
                    AppConsistent = true,
                    SnapshotGroup = true,
                },
            },
            Disabled = false,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
			NameRegex: pulumi.StringRef("no-deleteing-hbr-ecs-server-backup-plan"),
			Status:    pulumi.StringRef("Running"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = hbr.NewServerBackupPlan(ctx, "example", &hbr.ServerBackupPlanArgs{
			EcsServerBackupPlanName: pulumi.String("server_backup_plan"),
			InstanceId:              pulumi.String(_default.Instances[0].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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.actiontrail.inputs.GetInstancesArgs;
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 default = EcsFunctions.getInstances(GetInstancesArgs.builder()
            .nameRegex("no-deleteing-hbr-ecs-server-backup-plan")
            .status("Running")
            .build());

        var example = new ServerBackupPlan("example", ServerBackupPlanArgs.builder()        
            .ecsServerBackupPlanName("server_backup_plan")
            .instanceId(default_.instances()[0].id())
            .schedule("I|1602673264|PT2H")
            .retention(1)
            .details(ServerBackupPlanDetailArgs.builder()
                .appConsistent(true)
                .snapshotGroup(true)
                .build())
            .disabled(false)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ecs.get_instances(name_regex="no-deleteing-hbr-ecs-server-backup-plan",
    status="Running")
example = alicloud.hbr.ServerBackupPlan("example",
    ecs_server_backup_plan_name="server_backup_plan",
    instance_id=default.instances[0].id,
    schedule="I|1602673264|PT2H",
    retention=1,
    details=[alicloud.hbr.ServerBackupPlanDetailArgs(
        app_consistent=True,
        snapshot_group=True,
    )],
    disabled=False)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.ecs.getInstances({
    nameRegex: "no-deleteing-hbr-ecs-server-backup-plan",
    status: "Running",
});
const example = new alicloud.hbr.ServerBackupPlan("example", {
    ecsServerBackupPlanName: "server_backup_plan",
    instanceId: _default.then(_default => _default.instances?[0]?.id),
    schedule: "I|1602673264|PT2H",
    retention: 1,
    details: [{
        appConsistent: true,
        snapshotGroup: true,
    }],
    disabled: false,
});
resources:
  example:
    type: alicloud:hbr:ServerBackupPlan
    properties:
      ecsServerBackupPlanName: server_backup_plan
      instanceId: ${default.instances[0].id}
      schedule: I|1602673264|PT2H
      retention: 1
      details:
        - appConsistent: true
          snapshotGroup: true
      disabled: false
variables:
  default:
    Fn::Invoke:
      Function: alicloud:ecs:getInstances
      Arguments:
        nameRegex: no-deleteing-hbr-ecs-server-backup-plan
        status: Running

Create a ServerBackupPlan Resource

new ServerBackupPlan(name: string, args: ServerBackupPlanArgs, opts?: CustomResourceOptions);
@overload
def ServerBackupPlan(resource_name: str,
                     opts: Optional[ResourceOptions] = 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)
@overload
def ServerBackupPlan(resource_name: str,
                     args: ServerBackupPlanArgs,
                     opts: Optional[ResourceOptions] = 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.

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.

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.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}

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}

Disabled bool

Whether to disable the backup task. Valid values: true, false.

details List<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 Integer

Backup retention days, the minimum is 1.

schedule String

Backup strategy. Optional format: I|{startTime}|{interval}

disabled Boolean

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 number

Backup retention days, the minimum is 1.

schedule string

Backup strategy. Optional format: I|{startTime}|{interval}

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}

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}

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 an 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,
        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:
Details List<Pulumi.AliCloud.Hbr.Inputs.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}

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}

details List<ServerBackupPlanDetailArgs>

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}

details ServerBackupPlanDetailArgs[]

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}

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}

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}

Supporting Types

ServerBackupPlanDetail

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>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.