Set-VBRComputerGFSOptions

Short Description

Modifies settings of GFS retention for Veeam Agent backup jobs.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Set-VBRComputerGFSOptions -GFSOptions <VBRComputerGFSOptions> [-GFSWeeklyOptions <VBRComputerGFSWeeklyOptions>][-GFSMonthlyOptions <VBRComputerGFSMonthlyOptions>] [-GFSYearlyOptions <VBRComputerGFSYearlyOptions>][-EnableGFSWeeklyBackup] [-EnableGFSMonthlyBackup] [-EnableGFSYearlyBackup]  [<CommonParameters>]

Detailed Description

This cmdlet modifies settings of GFS retention for Veeam Agent backup jobs. 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

GFSOptions

Specifies GFS retention. The cmdlet will modify this policy.

VBRComputerGFSOptions

True

Named

True

GFSWeeklyOptions

Specifies settings of a weekly GFS retention policy. The cmdlet will define GFS retention with these settings.

Accepts the VBRComputerGFSWeeklyOptions object. To create this object, run the New-VBRComputerGFSWeeklyOptions cmdlet.

False

Named

False

GFSMonthlyOptions

Specifies settings of a monthly GFS retention policy. The cmdlet will define GFS retention with these settings.

Accepts the VBRComputerGFSMonthlyOptions object. To create this object, run the New-VBRComputerGFSMonthlyOptions cmdlet.

False

Named

False

GFSYearlyOptions

Specifies settings of a yearly GFS retention policy. The cmdlet will define GFS retention with these settings.

Accepts the VBRComputerGFSYearlyOptions object. To create this object, run the New-VBRComputerGFSYearlyOptions cmdlet.

False

Named

False

EnableGFSWeeklyBackup

Defines that the cmdlet will enable a weekly GFS retention policy. If you do not provide this parameter, the cmdlet will not change the settings of weekly GFS retention policy.

SwitchParameter

False

Named

False

EnableGFSMonthlyBackup

Defines that the cmdlet will enable a monthly GFS retention policy. If you do not provide this parameter, the cmdlet will not change the settings of a monthly GFS retention policy.

SwitchParameter

False

Named

False

EnableGFSYearlyBackup

Defines that the cmdlet will enable a yearly GFS retention policy. If you do not provide this parameter, the cmdlet will not change the settings of a yearly GFS retention policy.

SwitchParameter

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

This cmdlet returns the VBRComputerGFSOptions object that contains settings of GFS retention for Veeam Agent backup jobs.

Examples

Set-VBRComputerGFSOptionsExample 1. Enabling Monthly GFS Retention Policy

This example shows how to enable the monthly retention policy to create backups on the last week of every month and will keep them for 2 months.

$weekly = New-VBRComputerGFSWeeklyOptions -RetentionPeriod 3 -SelectedDay Wednesday

$options = New-VBRComputerGFSOptions -GFSWeeklyOptions $weekly

$monthly = New-VBRComputerGFSMonthlyOptions -RetentionPeriod 2 -SelectedWeek Last

Set-VBRComputerGFSOptions -GFSOptions $options -EnableGFSMonthlyBackup -GFSMonthlyOptions $monthly

Perform the following steps:

  1. Define the GFS Retention Policy:
  1. Run the New-VBRComputerGFSWeeklyOptions cmdlet. Specify the RetentionPeriod and the SelectedDay parameters. Save the result to the $weekly variable.
  2. Run the New-VBRComputerGFSOptions cmdlet. Set the $weekly variable as the GFSWeeklyOptions parameter value. Save the result to the $options variable.
  1. Run the New-VBRComputerGFSMonthlyOptions cmdlet. Specify the RetentionPeriod and the SelectedWeek parameters. Save the result to the $monthly variable.
  2. Run the Set-VBRComputerGFSOptions cmdlet. Specify the following settings:
  • Set the $options variable as the GFSOptions parameter value.
  • Provide the EnableGFSMonthlyBackup parameter.
  • Set the $monthly variable as the GFSMonthlyOptions parameter value.

Set-VBRComputerGFSOptionsExample 2. Enabling Yearly GFS Retention Policy

This example shows how to enable the yearly retention policy to create backups on November and will keep them for 2 years.

$weekly = New-VBRComputerGFSWeeklyOptions -RetentionPeriod 3 -SelectedDay Wednesday

$options = New-VBRComputerGFSOptions -GFSWeeklyOptions $weekly

$yearly = New-VBRComputerGFSYearlyOptions -RetentionPeriod 2 -SelectedMonth November

Set-VBRComputerGFSOptions -GFSOptions $options -EnableGFSYearlyBackup -GFSYearlyOptions $yearly

Perform the following steps:

  1. Define the GFS Retention Policy:
  1. Run the New-VBRComputerGFSWeeklyOptions cmdlet. Specify the RetentionPeriod and the SelectedDay parameters. Save the result to the $weekly variable.
  2. Run the New-VBRComputerGFSOptions cmdlet. Set the $weekly variable as the GFSWeeklyOptions parameter value. Save the result to the $options variable.
  1. Run the New-VBRComputerGFSYearlyOptions cmdlet. Specify the RetentionPeriod and the SelectedMonth parameters. Save the result to the $yearly variable.
  2. Run the Set-VBRComputerGFSOptions cmdlet. Specify the following settings:
  • Set the $options variable as the GFSOptions parameter value.
  • Provide the EnableGFSYearlyBackup parameter.
  • Set the $yearly variable as the GFSYearlyOptions parameter value.

Related Commands

I want to report a typo

There is a misspelling right here:

 

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