Set-VBORepository

Short Description

Modifies the backup repository settings.

Syntax

This cmdlet provides parameter sets that allow you to:

  • Modify a backup repository with retention period measured in years.

Set-VBORepository -Repository <VBORepository> [-Name <String>] [-Description <String>] [-RetentionPeriod <VBORetentionPeriod>] [-RetentionFrequencyType <VBORetentionFrequencyType>] [-DailyTime <timespan>] [-DailyType <VBODailyType>] [-MonthlyTime <timespan>] [-MonthlyDayNumber <VBOMonthlyDayNumber>] [-MonthlyDayOfWeek <dayofweek>] [<CommonParameters>]

  • Modify a backup repository with retention period measured in months or days.

Set-VBORepository -Repository <VBORepository> [-Name <String>] [-Description <String>] [-CustomRetentionPeriodType <VBORetentionPeriodType>] [-CustomRetentionPeriod <Int32>] [-RetentionFrequencyType <VBORetentionFrequencyType>] [-DailyTime <timespan>] [-DailyType <VBODailyType>] [-MonthlyTime <timespan>] [-MonthlyDayNumber <VBOMonthlyDayNumber>] [-MonthlyDayOfWeek <dayofweek>] [<CommonParameters>]

Detailed Description

This cmdlet modifies settings of a backup repository added to the Veeam Backup for Microsoft 365 infrastructure. To modify settings, you need to enter the necessary parameters with new values. The parameters that you omit will remain unchanged.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Repository

Specifies a backup repository. The cmdlet will modify settings of this object.

Accepts the VBORepository object.

To get this object, run the Get-VBORepository cmdlet.

True

Named

True (ByValue)

False

RetentionPeriod

Specifies the retention period in years. Veeam Backup for Microsoft 365 will remove items from a backup repository once this period is passed. You can set either of the following periods:

  • Year1
  • Years2
  • Years3
  • Years5
  • Years7
  • Years10
  • Years25
  • KeepForever

Default: Years3

Note: Apply the CustomRetentionPeriodType parameter to set the retention period in months or days.

VBORetentionPeriod

False

Named

False

False

Name

Specifies a name of the backup repository. The cmdlet will change the name of this backup repository.

String

False

Named

False

False

Description

Specifies a description of the backup repository. The cmdlet will replace the current description of the backup repository.

String

False

Named

False

False

CustomRetentionPeriodType

Specifies a type of the custom retention period. Veeam Backup for Microsoft 365 will remove items from a backup repository once this period is passed. You can set the custom retention period to either of the following types:

  • Months
  • Days

Set the CustomRetentionPeriod parameter to specify the number of days or the number of months.

VBORetentionPeriodType

False

Named

False

False

CustomRetentionPeriod

For the CustomRetentionPeriodType option.

Specifies the retention period to keep data on a backup repository. The retention period is defined according to the CustomRetentionPeriod settings:

  • Sets the retention period to the number of months if the CustomRetentionPeriodType parameter is set to Months.
  • Sets the retention period to the number of days if the CustomRetentionPeriodType parameter is set to Days.

Veeam Backup for Microsoft 365 will remove items from a backup repository once this period is passed.

Int32

False

Named

False

False

RetentionFrequencyType

Specifies retention policy schedule. Veeam Backup for Microsoft 365 will check a backup repository and will remove the outdated backups according to this schedule. You can set either of the following types of schedule:

  • Daily: to check a backup repository and remove the outdated backups once a day.
    Set the DailyTime and DailyType parameters to specify the daily retention policy schedule.
  • Monthly: to check a backup repository and remove the outdated backups once a month.
    Set the MonthlyTime, MonthlyDayNumber and MonthlyDayOfWeek parameters to specify the monthly retention policy schedule.

Default: Daily

VBORetentionFrequencyType

False

Named

False

False

DailyTime

For daily retention policy schedule.

Specifies the time of the day when Veeam Backup for Microsoft 365 must apply the retention policy.

Default: 00:00:00

TimeSpan

False

Named

False

False

DailyType

For daily retention policy schedule.

Specifies the days when Veeam Backup for Microsoft 365 must apply the retention policy:

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Everyday
  • Workdays
  • Weekends

Default: Everyday

VBODailyType

False

Named

False

False

MonthlyTime

For monthly retention policy schedule.

Specifies the time of the day when Veeam Backup for Microsoft 365 must apply the retention policy.

Default: 18:00:00

TimeSpan

False

Named

False

False

MonthlyDayNumber

For monthly retention policy schedule.

Specifies the order number for the day of the week when Veeam Backup for Microsoft 365 must apply the retention policy.

  • First
  • Second
  • Third
  • Fourth
  • Last

Default: First

VBOMonthlyDayNumber

False

Named

False

False

MonthlyDayOfWeek

For monthly retention policy schedule.

Specifies the day of the week when Veeam Backup for Microsoft 365 must apply the retention policy.

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday

Default: Monday

DayOfWeek

False

Named

False

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 VBORepository object that contains settings of the Veeam Backup for Microsoft 365 repository.

Examples

Set-VBORepositoryExample 1. Modifying Retention Policy Settings

This example shows how to modify retention policy settings for the backup repository. The repository will have the following settings:

  • The retention period is set to 5 years.
  • Veeam Backup for Microsoft 365 will check the backup repository and remove the outdated backups on weekends at 11:59 PM.

$repository = Get-VBORepository -Name "ABC Backup"

Set-VBORepository -Repository $repository -RetentionPeriod Years5 -RetentionFrequencyType Daily -DailyType Weekends -DailyTime 23:59:00

Perform the following steps:

  1. Run the Get-VBORepository cmdlet. Save the result to the $repository variable.
  2. Run the Set-VBORepository cmdlet. Specify the following settings:
  • Set the $repository variable as the Repository parameter value.
  • Set Years5 as the RetentionPeriod parameter value.
  • Set Daily as the RetentionFrequencyType parameter value.
  • Set Weekends as the DailyType parameter value.
  • Set 23:59:00 as the DailyTime parameter value.

Set-VBORepositoryExample 2. Modifying Backup Repository Name and Retention Policy

This example shows how to change the name of the ABC Backup backup repository and configure the clean-up schedule with the following settings:

  • The retention period for organization backups is set to 6 months.
  • Veeam Backup for Microsoft 365 will check the backup repository and remove the outdated backups every second Monday at 7:59 AM.

$repository = Get-VBORepository -Name "ABC Backup"

Set-VBORepository -Repository $repository -Name "Monthly Reports" -CustomRetentionPeriodType Months -CustomRetentionPeriod 6 -RetentionFrequencyType Monthly -MonthlyDayNumber Second -MonthlyDayOfWeek Monday -MonthlyTime 07:59:00

Perform the following steps:

  1. Run the Get-VBORepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
  2. Run the Set-VBORepository cmdlet. Specify the following settings:
  • Set the $repository variable as the Repository parameter value.
  • Specify the Name parameter value.
  • Set Months as the CustomRetentionPeriodType parameter value.
  • Set 6 as the CustomRetentionPeriod parameter value.
  • Set Monthly as the RetentionFrequencyType parameter value.
  • Set Second as the MonthlyDayNumber parameter value.
  • Set Monday as the MonthlyDayOfWeek parameter value.
  • Set 07:59:00 as the MonthlyTime parameter value.

Related Commands

Get-VBORepository