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

Basic Usage

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

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

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

Properties

Link copied to clipboard

ECS server backup plan details.

Link copied to clipboard
val disabled: Output<Boolean>

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

Link copied to clipboard

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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceId: Output<String>

The ID of ECS instance.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val retention: Output<Int>

Backup retention days, the minimum is 1.

Link copied to clipboard
val schedule: Output<String>

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

Link copied to clipboard
val urn: Output<String>