Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 3.0
PowerShell Reference

Add-VBORepository

Short Description

Adds backup repositories to Veeam Backup for Microsoft Office 365.

Syntax

This cmdlet provides the following parameter sets.

  • Add a backup repository with default retention policy period:

Add-VBORepository -Proxy <VBOProxy> -Name <String> -Path <String> [-RetentionType <[VBORetentionType]>] [-Description <String>] [-Force <SwitchParameter>] [<CommonParameters>]

  • Add a backup repository with the retention period set to years. Veeam Backup for Microsoft Office 365 applies the retention policy daily:

Add-VBORepository -Proxy <VBOProxy> -Name <String> -Path <String> -RetentionPeriod <[VBORetentionPeriod]> -RetentionFrequencyType <VBORetentionFrequencyType> -DailyTime <TimeSpan> -DailyType <VBODailyType> [-RetentionType <[VBORetentionType]>] [-Description <String>] [-Force <SwitchParameter>] [<CommonParameters>]

  • Add a backup repository with the retention period set to years.  Veeam Backup for Microsoft Office 365 applies the retention policy monthly:

Add-VBORepository -Proxy <VBOProxy> -Name <String> -Path <String> -RetentionPeriod <[VBORetentionPeriod]> -RetentionFrequencyType <VBORetentionFrequencyType> -MonthlyTime <TimeSpan> -MonthlyDayNumber <VBOMonthlyDayNumber> -MonthlyDayOfWeek <DayOfWeek> [-RetentionType <[VBORetentionType]>] [-Description <String>] [-Force <SwitchParameter>] [<CommonParameters>]

  • Add a backup repository with the custom retention period. Veeam Backup for Microsoft Office 365 applies the retention policy daily:

Add-VBORepository -Proxy <VBOProxy> -Name <String> -Path <String> -CustomRetentionPeriodType <VBORetentionPeriodType> -CustomRetentionPeriod <Int32> -RetentionFrequencyType <VBORetentionFrequencyType> -DailyTime <TimeSpan> -DailyType <VBODailyType> [-RetentionType <[VBORetentionType]>] [-Description <String>] [-Force <SwitchParameter>] [<CommonParameters>]

  • Add a backup repository with the custom retention period. Veeam Backup for Microsoft Office 365 applies the retention policy monthly:

Add-VBORepository -Proxy <VBOProxy> -Name <String> -Path <String> -CustomRetentionPeriodType <VBORetentionPeriodType> -CustomRetentionPeriod <Int32> -RetentionFrequencyType <VBORetentionFrequencyType> -MonthlyTime <TimeSpan> -MonthlyDayNumber <VBOMonthlyDayNumber> -MonthlyDayOfWeek <DayOfWeek> [-RetentionType <[VBORetentionType]>] [-Description <String>] [-Force <SwitchParameter>] [<CommonParameters>]

Detailed Description

This cmdlet adds a backup repository to a Veeam Backup for Microsoft Office 365 infrastructure. A backup repository is a folder on a proxy sever where Veeam Backup for Microsoft Office 365 keeps organization backups. Every backup repository has the retention policy that defines how long you want to keep backups on a backup repository.

You can specify retention policy settings to keep data on a backup repository:

  • Retention period to specify how long you want to keep data on a backup repository. You can set the period to years, months or days.
  • Retention policy schedule to specify the day and time, when Veeam Backup for Microsoft Office 365 must check the backup repository and remove the outdated backups. You can set the schedule to daily or monthly.
  • Retention policy type: you can set it to Item-level or to snapshot-based types.

For more information on retention policy, see section Understanding Retention Policy of the Veeam Backup for Microsoft Office 365 3.0 User Guide.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Proxy

Specifies a backup proxy. The cmdlet will deploy a new repository on this proxy.

Accepts the VBOProxy type. To get this object, run the Get-VBOProxy cmdlet.

True

Named

False

False

Name

Specifies a name for the backup repository. The cmdlet will deploy the repository with this name.

True

Named

False

False

Description

Specifies a description for future reference. The default description contains information on the user who added the backup repository, date and time when the backup repository was added.

False

Named

False

False

Path

Specifies the full path to the backup repository on the backup proxy.

True

Named

False

False

Retention
Period

Specifies the retention period in years. Veeam Backup for Microsoft Office 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.

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

True

Named

False

False

RetentionType

Specifies the type of retention policy. You can set either of the following types:

  • ItemLevel
  • SnapshotBased

Default: ItemLevel

False

Named

False

False

Custom
Retention
Period
Type

Specifies the type of custom retention period. You can set either of the following types:

  • Months
  • Days

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

True

Named

False

False

Custom
Retention
Period

For the CustomRetentionPeriodType option.

Specifies the retention period to keep data on a backup repository.

  • 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 Office 365 will remove items from a backup repository once this period is passed.

True

Named

False

False

Retention
Frequency
Type

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

  • Daily: to check a backup repository and remove the outdated backups once a day.
    Set the DailyTime and  DailyType parameters to specify 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 monthly retention policy schedule.

Default: Daily

True

Named

False

False

Daily
Time

For daily retention policy schedule.

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

Default: 00:00:00

True

Named

False

False

Daily
Type

For daily retention policy schedule.

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

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

Default: Everyday

True

Named

False

False

Monthly
Time

For monthly retention policy schedule.

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

Default: 18:00:00

True

Named

False

False

Monthly
DayNumber

For monthly retention policy schedule.

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

  • First
  • Second
  • Third
  • Fourth
  • Last

Default: First

True

Named

False

False

Monthly
DayOfWeek

For monthly retention policy schedule.

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

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

Default: Monday

True

Named

False

False

Force

Indicates that the cmdlet will add a backup repository to Veeam Backup for Microsoft Office 365 infrastructure if this repository is assigned to the other backup proxy without notifying the user.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Example 1

This example shows how to add External Data Storage backup repository to the support.north.local proxy. The retention type is set to snapshot based.

  1. Run the Get-VBOProxy cmdlet. Set support.north.local as the Hostname parameter value. Save the result to the $proxy variable.
  2. Run the Add-VBORepository cmdlet. Specify the following settings:
  • Set the $proxy variable as the Proxy parameter value.
  • Set External Data Storage as the Name parameter value.
  • Set the C:\External Data Storage path as the Path parameter value.
  • Set SnapshotBased as the RetentionType parameter value.

$proxy = Get-VBOProxy -Hostname support.north.local

Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -Description "North Backup Repository" -RetentionType SnapshotBased

Example 2

This example shows how to add an External Data Storage backup repository on a backup proxy with the d96f55a4-d15d-410b-b0f0-d51d17ccdab6 ID.

The retention settings for the backup repository will be the following:

  • The retention period is 1 year.
  • Veeam Backup for Microsoft Office 365 will check the backup repository and remove the outdated backups daily at 3:00 PM.
  • The retention type is item-level.

You must perform the following steps:

  1. Run the Get-VBOProxy cmdlet. Set d96f55a4-d15d-410b-b0f0-d51d17ccdab6 as the ID parameter value. Save the result to the $proxy variable.
  2. Run the Add-VBORepository cmdlet. Specify the following settings:
  • Set the $proxy variable as the Proxy parameter value.
  • Set External Data Storage as the Name parameter value.
  • Set Year1 as the RetentionPeriod parameter value.
  • Set Daily as the RetentionFrequencyType parameter value.
  • Set 15:00:00 as the DailyTime parameter value.
  • Set Everyday as the DailyType parameter value.
  • Set ItemLevel as the RetentionType parameter value.

$proxy = Get-VBOProxy -Id "d96f55a4-d15d-410b-b0f0-d51d17ccdab6"

Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -RetentionPeriod Year1 -RetentionFrequencyType Daily -DailyTime 15:00:00 -DailyType Everyday -Description "Daily Backup Repository" -RetentionType ItemLevel

Example 3

This example shows how to add the External Data Storage backup repository on the support.south.local backup proxy.

The retention settings for the backup repository will be the following:

  • The retention period is 2 year.
  • Veeam Backup for Microsoft Office 365 will check the backup repository and remove the outdated backups every last Sunday at 2:00 PM.
  • The retention type is snapshot based.

You must perform the following steps:

  1. Run the Get-VBOProxy cmdlet. Set support.south.local as the Hostname parameter value. Save the result to the $proxy variable.
  2. Run the Add-VBORepository cmdlet. Specify the following settings:
  • Set External Data Storage as the Name parameter value.
  • Set the $proxy variable as the Proxy parameter value.
  • Set Year2 as the RetentionPeriod parameter value.
  • Set Monthly as the RetentionFrequencyType parameter value.
  • Set 14:00:00 as the MonthlyTime parameter value.
  • Set Last as the MonthlyDayNumber parameter value.
  • Set Sunday as the MonthlyDayOfWeek parameter value.
  • Set SnapshotBased as the RetentionType parameter value.

$proxy = Get-VBOProxy -Hostname "support.south.local"

Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -RetentionPeriod Year2 -RetentionFrequencyType Monthly -MonthlyTime 14:00:00 -MonthlyDayNumber Last -MonthlyDayOfWeek Sunday -Description "Monthly ABC" -RetentionType SnapshotBased

Example 4

This example shows how to add the External Data Storage backup repository on a backup proxy with the d96f55a4-d15d-410b-b0f0-d51d17ccdab6 ID.

The retention settings for the backup repository will be the following:

  • The retention period is 3 months.
  • Veeam Backup for Microsoft Office 365 will check the backup repository and remove the outdated backups daily at 12:00 PM.
  • The retention type is snapshot based.

You must perform the following steps:

  1. Run the Get-VBOProxy cmdlet. Set support.south.local as the Hostname parameter value. Save the result to the $proxy variable.
  2. Run the Add-VBORepository cmdlet. Specify the following retention settings:
  • Set the $proxy variable as the Proxy parameter value.
  • Set External Data Storage as the Name parameter value.
  • Set Months as the CustomRetentionPeriodType parameter value.
  • Set 3 as the CustomRetentionPeriod parameter value.
  • Set Daily as the RetentionFrequencyType parameter value.
  • Set 12:00:00 as the DailyTime parameter value.
  • Set Workdays as the DailyType parameter value.
  • Set SnapshotBased as the RetentionType parameter value.

$proxy = Get-VBOProxy -Id "d96f55a4-d15d-410b-b0f0-d51d17ccdab6"

Add-VBORepository -Proxy $proxy -Name "Daily Reports" -Path "C:\External Data Storage" -CustomRetentionPeriodType Months -CustomRetentionPeriod 3 -RetentionFrequencyType Daily -DailyTime 12:00:00 -DailyType Workdays -Description "Daily ABC" -RetentionType SnapshotBased

Example 5

This example shows how to add a new backup repository with the following retention settings:

  • The retention period for organization data is 7 days.
  • Veeam Backup for Microsoft Office 365 will check the backup repository and remove the outdated backups every first Monday at 8:00 AM.
  • The retention type is item-level.

You must perform the following steps:

  1. Run the Get-VBOProxy cmdlet to get the backup proxy where the repository will be added. Save the result to the $proxy variable.
  2. Run the Add-VBORepository cmdlet. Specify the following retention settings:
  • Set the $proxy variable as the Proxy parameter value.
  • Set External Data Storage as the Name parameter value.
  • Set C:\External Data Storage as the Path parameter.
  • Set 7 as the CustomRetentionPeriod parameter value.
  • Set Monthly as the RetentionFrequencyType parameter value.
  • Set 08:00:00 as the MonthlyTime parameter value.
  • Set First as the MonthlyDayNumber parameter value.
  • Set Monday as the MonthlyDayOfWeek parameter value.
  • Set ItemLevel as the RetentionType parameter value.

$proxy = Get-VBOProxy -Hostname support.west.local

Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -CustomRetentionPeriodType Days -CustomRetentionPeriod 7 -RetentionFrequencyType Monthly -MonthlyTime 08:00:00 -MonthlyDayNumber First -MonthlyDayOfWeek Monday -Description "Monthly ABC" -RetentionType ItemLevel

Related Commands

Get-VBOProxy

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference