New-VBRCDPPolicyRetentionOptions

Short Description

Defines retention setting of CDP policies.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

New-VBRCDPPolicyRetentionOptions [-RPOIntervalType <VBRCDPRPOIntervalType> {Minutes | Seconds}] [-RPOInterval <int>] [-BackupWindow <VBRBackupWindowOptions>] [-ShortTermRetentionIntervalType <VBRCDPRetentionIntervalType> {Minutes | Hours}] [-ShortTermRetentionInterval <int>] [-LongTermRetentionFrequency <int>] [-LongTermRetentionInterval <int>] [-LongTermRetentionIntervalType <VBRCDPRetentionIntervalType> {Minutes | Hours}] [-ApplicationProcessingBackupWindow <VBRBackupWindowOptions>] [-EnableRPOMarkAsWarning <bool>][-MarkJobAsWarningThreshold <int>] [-MarkJobAsWarningIntervalType <VBRCDPRPOIntervalType> {Minutes | Seconds}][-EnableRPOMarkAsError <bool>] [-MarkJobAsErrorThreshold <int>] [-MarkJobAsErrorIntervalType]<VBRCDPRPOIntervalType> {Minutes | Seconds}]  [<CommonParameters>]

Detailed Description

This cmdlet creates the VBRCDPPolicyRetentionOptions object that defines the following setting of CDP policies:

  • Recovery point objective (RPO) — a setting that defines the maximum allowed time of the data loss in case the production VM is down.
  • Retention policy — a setting that defines the schedule for the short-term and long-term retention policies.
  • RPO reports settings — a setting that defines when CDP policies are marked with the RPO warning or error.
  • Schedule — a setting that defines when a CDP policy must create crash-consistent and application-consistent backups.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

RPOIntervalType

Specifies RPO settings. The cmdlet will schedule the CDP policy to create a replicated state of the source VMs. You can set one of the following units of time:

  • Minutes: Use this option to schedule a CDP policy to create a replicated state of the source VMs every N minutes.
  • Seconds: Use this option to schedule a CDP policy to create a replicated state of the source VMs every N seconds.

Default: Seconds.

VBRCDPRPOIntervalType

False

Named

False

RPOInterval

Specifies a number of minutes or seconds for the RPO settings. The cmdlet will schedule the CDP policy to create a replicated state of the source VMs every N seconds or minutes.

Default: 15

Int

False

Named

False

BackupWindow

Specifies a time interval within which a CDP policy is allowed to create a replicated state of the source VMs.

Accepts the VBRBackupWindowOptions object. To get this object, run the New-VBRBackupWindowOptions cmdlet.

False

Named

False

ShortTermRetentionIntervalType

For a short-term retention policy.

Specifies a period during which Veeam Backup & Replication will store a replicated state of the source VMs on a target datastore. You can set the period in one of the following units of time:

  • Minutes: Use this option to store a replicated state of the source VMs for last N minutes.
  • Hours: Use this option to store a replicated state of the source VMs for last N hours.

Default: Hours.

VBRCDPRetentionIntervalType

False

Named

False

ShortTermRetentionInterval

For a short-term retention settings.

Specifies a number of minutes or hours to store a replicated state of the source VMs. The cmdlet will schedule a CDP policy to store a replicated state of the source VMs only for last N minutes or hours.

Default: 4

Int

False

Named

False

LongTermRetentionIntervalType

For a long-term retention settings.

Specifies a period when a CDP policy must create long-term restore points. You can set the period in one of the following units of time:

  • Minutes: Use this option to create a long-term restore point every N minutes.
  • Hours: Use this option to create a long-term restore point every N hours.

Default: Hours.

VBRCDPRetentionIntervalType

False

Named

False

LongTermRetentionFrequency

For a long-term retention settings.

Specifies how often a CDP policy must create a long-term restore point. The cmdlet will schedule the CDP policy to create a restore point every N hours.

Default: 8.

Int

False

Named

False

LongTermRetentionInterval

For a long-term retention settings.

Specifies a number of days to keep a long-term restore point in a datastore. After this period is passed, Veeam Backup & Replication will delete a long-term restore point.

Default: 7.

Int

False

Named

False

ApplicationProcessingBackupWindow

Specifies a schedule that defines when a CDP policy must create crash-consistent and application-consistent backups.

Accepts the New-VBRBackupWindowOptions object. To get this object, run the New-VBRBackupWindowOptions cmdlet.

False

Named

False

EnableRPOMarkAsWarning

For RPO reports.

Enables RPO warning reports for a CDP policy.

Bool

False

Named

False

MarkJobAsWarningThreshold

For RPO reports.

Specifies an allowed time limit of the exceeded RPO. Veeam Backup & Replication will send notification with a warning if this time limit is reached.

Defaule: 2.

Int

False

Named

False

MarkJobAsWarningIntervalType

For RPO reports.

Specifies a time interval of the exceeded RPO. You can set the period in one of the following units of time:

  • Seconds: Use this option to get a warning notification after a time interval of the exceeded RPO reaches N seconds.
  • Minutes: Use this option to get a warning notification after a time interval of the exceeded RPO reaches N minutes.

Default: Seconds.

VBRCDPRPOIntervalType

False

Named

False

EnableRPOMarkAsError

For RPO reports.

Enables RPO error reports for a CDP policy.

Bool

False

Named

False

MarkJobAsErrorThreshold

For RPO reports.

Specifies an allowed time limit of the exceeded RPO. Veeam Backup & Replication will send notification with a warning if this time limit is reached.

Defaule: 3.

Int

False

Named

False

MarkJobAsErrorIntervalType

For RPO reports.

Specifies a time interval of the exceeded RPO. You can set the period in one of the following units of time:

  • Seconds: Use this option to get an error notification after a time interval of the exceeded RPO reaches N seconds.
  • Minutes: Use this option to get an error notification after a time interval of the exceeded RPO reaches N minutes.

Default: Seconds.

VBRCDPRPOIntervalType

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Output Object

The cmdlet returns the VBRCDPPolicyRetentionOptions object that defines retention policy and schedule settings of CDP policies.

Examples

New-VBRCDPPolicyRetentionOptionsExample 1. Defining RPO Settings for CDP Policy

This example shows how to define the following RPO settings for a CDP policy:

  • The cmdlet will create a replicated state of the source VMs during the following periods of time:
  • From 22:00 to 22:59 on Friday
  • From 22:00 to 22:59 on Saturday
  • RPO is set to 10 minutes.

$windowoptions = New-VBRBackupWindowOptions -FromDay Friday -FromHour 22 -ToDay Saturday -ToHour 22 -Enabled

New-VBRCDPPolicyRetentionOptions -RPOIntervalType Minutes -RPOInterval 10 -BackupWindow $windowoptions

Perform the following steps:

  1. Run the New-VBRBackupWindowOptions cmdlet. Specify the FromDay, FromHour, ToHour, Enabled parameter value. Save the result to the $vm variable.
  2. Run the New-VBRCDPPolicyRetentionOptions cmdlet. Specify the following settings:
  • Specify the RPOIntervalType parameter value.
  • Specify the RPOInterval parameter value.
  • Set the $windowoptions variable as the BackupWindow parameter value.

New-VBRCDPPolicyRetentionOptionsExample 2. Defining Short-Term Retention for CDP Policy

This command schedules a CDP policy to keep only those VM replicated states that were created within last 2 hours.

New-VBRCDPPolicyRetentionOptions -ShortTermRetentionIntervalType Hours -ShortTermRetentionInterval 2

New-VBRCDPPolicyRetentionOptionsExample 3. Defining Long-Term Retention for CDP Policy

This command schedules a CDP policy to create a long-term restore points every 3 hours.

New-VBRCDPPolicyRetentionOptions -LongTermRetentionIntervalType Hours -LongTermRetentionInterval 3

Related Commands

New-VBRBackupWindowOptions