Set-VBRNASBackupArchivalOptions

Short Description

Modifies retention policy for file versions.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Set-VBRNASBackupArchivalOptions -Options <VBRNASBackupArchivalOptions> [-EnableActiveFileVersionRetention][-ActiveFileVersionRetention <int>] [-EnableDeletedFileVersionRetention] [-DeletedFileVersionRetention <int>] [-ArchivalType <VBRNASBackupArchivalType> {All | InclusionMask | ExclusionMask}] [-InclusionMask <string[]>] [-ExclusionMask <string[]>]  [<CommonParameters>]

Detailed Description

This cmdlet modifies settings of retention policy for file versions that are kept on the long-term repository. This cmdlet modifies an existing VMware replication job. To modify settings, you need to enter the corresponding parameters with new values. The parameters that you omit will remain unchanged.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Options

Specifies the retention policy for file versions. The cmdlet will modify the settings of this policy.

VBRNASBackupArchivalOptions

True

Named

True (ByValue, ByPropertyName)

 

EnableActiveFileVersionRetention

Defines that Veeam Backup & Replication will check that the number of active file versions does not exceed the specified limit.

SwitchParameter

False

Named

False

 

ActiveFileVersionRetention

Specifies the number of active file versions. Veeam Backup & Replication will keep the specified number of active file versions on the long-term repository. Once the number of file versions exceeds, Veeam Backup & Replication will remove the oldest file version from the repository.

Note: If you do not specify this parameter, the number of active file versions is set to unlimited. Veeam Backup & Replication will delete active file versions from the backup repository after the retention period that is specified for the long-term

Default: 10

Int32

False

Named

False

 

EnableDeletedFileVersionRetention

Defines that Veeam Backup & Replication will check that the number of deleted file versions does not exceed the specified limit.

SwitchParameter

False

Named

False

 

DeletedFileVersionRetention

Specifies the number of deleted file versions. Veeam Backup & Replication will keep the specified number of deleted file versions on the long-term repository. Once the number of file versions exceeds, Veeam Backup & Replication will remove the oldest version from the repository.

Note: If you do not specify this parameter, the number of deleted file versions is set to unlimited. Veeam Backup & Replication will remove deleted files versions from the backup repository after the retention period that is specified for the long-term repository is passed.

Default: 3

Int32

False

Named

False

 

ArchivalType

Specifies the filter settings for file versions that must be kept on the long-term repository. You can specify either of the following filter settings:

  • All: use this option if you want to keep all types of file versions on the long-term repository.
  • InclusionMask: use this option if you want to keep only file versions with specific extensions on the long-term repository.
    Use the InclusionMask parameter to specify these extensions.
  • ExclusionMask: use this option if you do not want to keep file versions with specific extensions on the long-term repository.
    Use the ExclusionMask parameter to specify these extensions.

VBRNASBackupArchivalType

False

Named

False

 

InclusionMask

For the ArchivalType parameter with the InclusionMask value.

Specifies a file mask for files and folders that you want to add to the file backup job. The cmdlet will back up only these files and folders.

String[]

False

Named

False

 

ExclusionMask

For the ArchivalType parameter with the ExclusionMask value.

Specifies a file mask for files and folders that you do not want to add to the file backup job.

String[]

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 VBRNASBackupArchivalOptions object that contains settings of files and folders that will be added to the file backup job.

Examples

Set-VBRNASBackupArchivalOptionsExample 1. Enabling Retention for Active File Versions

This example shows how to enable retention policy for active file versions. The retention policy for file versions will have the following settings:

  • The long-term repository will not keep exe file extensions.
  • The long-term repository will keep active file versions for 14 days.

 

$archiveoptions = New-VBRNASBackupArchivalOptions -ArchivalType ExclusionMask -ExclusionMask .exe

Set-VBRNASBackupArchivalOptions -Options $archiveoptions -EnableActiveFileVersionRetention -ActiveFileVersionRetention 14

Perform the following steps:

  1. Run the New-VBRNASBackupArchivalOptions cmdlet. Specify the ArchivalType parameter. Specify the ExclusionMask parameter value. Save the result to the $archiveoptions variable.
  2. Run the Set-VBRNASBackupArchivalOptions cmdlet. Specify the following settings:
  • Set the $archiveoptions variable as the Options parameter value.
  • Specify the EnableActiveFileVersionRetention parameter.
  • Specify the ActiveFileVersionRetention parameter value.

Set-VBRNASBackupArchivalOptionsExample 2. Enabling Retention for Deleted File Versions

This example shows how to enable retention policy for deleted file versions. The long-term repository will keep deleted file versions for 7 days.

$archiveoptions = New-VBRNASBackupArchivalOptions -ArchivalType ExclusionMask -ExclusionMask "DOCX"

Set-VBRNASBackupArchivalOptions -Options $archiveoptions -EnableDeletedFileVersionRetention -DeletedFileVersionRetention 7

Perform the following steps:

  1. Run the New-VBRNASBackupArchivalOptions cmdlet. Specify the ArchivalType parameter. Specify the ExclusionMask parameter value.  Save the result to the $archiveoptions variable.
  2. Run the Set-VBRNASBackupArchivalOptions cmdlet. Specify the following settings:
  • Set the $archiveoptions variable as the Options parameter value.
  • Specify the EnableDeletedFileVersionRetention parameter.
  • Specify the DeletedFileVersionRetention parameter value.

Set-VBRNASBackupArchivalOptionsExample 3. Modifying Filter Settings

This example shows how to modify filter settings of the retention policy for deleted file versions. The retention policy will have the following settings:

  • The long-term repository will keep .DOCX and .PDF file extensions.
  • The long-term repository will not keep .EXE and .JPEG  file extensions.

 

$archiveoptions = New-VBRNASBackupArchivalOptions -ArchivalType ExclusionMask -ExclusionMask "docx, exe"

Set-VBRNASBackupArchivalOptions -Options $archiveoptions -ArchivalType InclusionMask -InclusionMask "*.docx", "*.pdf"

Perform the following steps:

  1. Run the New-VBRNASBackupArchivalOptions cmdlet. Specify the ExclusionMask parameter value.  Save the result to the $archiveoptions variable.
  2. Run the Set-VBRNASBackupArchivalOptions cmdlet. Specify the following settings:
  • Set the $archiveoptions variable as the Options parameter value.
  • Set the InclusionMask as the ArchivalType parameter value.
  • Specify the InclusionMask parameter value.

Related Commands

New-VBRNASBackupArchivalOptions

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.