Add-VBORepository

In this article

    Short Description

    Adds backup repositories to Veeam Backup for Microsoft Office 365.

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • Add a backup repository with the 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>]

    • Add a backup repository expanded with an object storage repository.

    Add-VBORepository -Proxy <VBOProxy> -Name <string> -Path <string> -ObjectStorageRepository <VBOObjectStorageRepository> [-RetentionType {ItemLevel | SnapshotBased}] [-Description <string>][-ObjectStorageEncryptionKey <VBOEncryptionKey>] [-Force] [-SyncNow] [<CommonParameters>]

    • Add a backup repository expanded with an object storage repository. The retention period set to years and retention policy applied daily.

    Add-VBORepository -Proxy <VBOProxy> -Name <string> -Path <string> -RetentionPeriod {Year1 | Years2 | Years3 |Years5 | Years7 | Years10 | Years25 | KeepForever} -RetentionFrequencyType {Daily | Monthly} -DailyTime <timespan> -DailyType {Everyday | Workdays | Weekends | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday}-ObjectStorageRepository <VBOObjectStorageRepository> [-RetentionType {ItemLevel | SnapshotBased}] [-Description <string>] [-ObjectStorageEncryptionKey <VBOEncryptionKey>] [-Force] [-SyncNow] [<CommonParameters>]

    • Add a backup repository expanded with an object storage repository and the custom retention period. Veeam Backup for Microsoft Office 365 applies the retention policy daily.

    Add-VBORepository -Proxy <VBOProxy> -Name <string> -Path <string> -CustomRetentionPeriodType {Months | Days} -CustomRetentionPeriod <int> -RetentionFrequencyType {Daily | Monthly} -DailyTime <timespan> -DailyType {Everyday | Workdays | Weekends | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday} -ObjectStorageRepository <VBOObjectStorageRepository> [-RetentionType {ItemLevel | SnapshotBased}] [-Description <string>] [-ObjectStorageEncryptionKey <VBOEncryptionKey>] [-Force] [-SyncNow] [<CommonParameters>]

    • Add a backup repository expanded with an object storage repository. The retention period set to years and retention policy applied monthly.

    Add-VBORepository -Proxy <VBOProxy> -Name <string> -Path <string> -RetentionPeriod {Year1 | Years2 | Years3 | Years5 | Years7 | Years10 | Years25 | KeepForever} -RetentionFrequencyType {Daily | Monthly} -MonthlyDayNumber {First | Second | Third | Fourth | Last} -MonthlyDayOfWeek {Sunday | Monday | Tuesday | Wednesday | Thursday |Friday | Saturday} -ObjectStorageRepository <VBOObjectStorageRepository> [-RetentionType {ItemLevel | SnapshotBased}] [-Description <string>] [-ObjectStorageEncryptionKey <VBOEncryptionKey>] [-Force][-SyncNow] [<CommonParameters>]

    • Add a backup repository expanded with an object storage repository and the custom retention period. Veeam Backup for Microsoft Office 365 applies the retention policy monthly.

    Add-VBORepository -Proxy <VBOProxy> -Name <string> -Path <string> -CustomRetentionPeriodType {Months | Days} CustomRetentionPeriod <int> -RetentionFrequencyType {Daily | Monthly} -MonthlyDayNumber {First | Second | Third | Fourth | Last} -MonthlyDayOfWeek {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday} -ObjectStorageRepository <VBOObjectStorageRepository> [-RetentionType {ItemLevel | SnapshotBased}] [-Description <string>] [-ObjectStorageEncryptionKey <VBOEncryptionKey>] [-Force] [-SyncNow] [<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 server 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 the following retention policy settings:

    • 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 to set it to Item-level or to snapshot-based types.

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

    Parameters

    Parameter

    Description

    Type

    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 object. To get this object, run the Get-VBOProxy cmdlet.

    True

    Named

    False

    False

    Name

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

    String

    True

    Named

    False

    False

    Description

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

    String

    False

    Named

    False

    False

    Path

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

    String

    True

    Named

    False

    False

    RetentionPeriod

    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.

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

    VBORetentionPeriod

    True

    Named

    False

    False

    RetentionType

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

    • ItemLevel
    • SnapshotBased

    Default: ItemLevel.

    VBORetentionFrequencyType

    False

    Named

    False

    False

    SyncNow

    Defines that the cmdlet will start to synchronize cache located on object storage repositories.

    SwitchParameter

    False

    Named

    False

    False

    CustomRetentionPeriodType

    Specifies the type of custom retention period. Veeam Backup for Microsoft Office 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

    True

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

    Int32

    True

    Named

    False

    False

    RetentionFrequencyType

    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 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

    True

    Named

    False

    False

    DailyTime

    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

    TimeSpan

    True

    Named

    False

    False

    DailyType

    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.

    VBODailyType

    True

    Named

    False

    False

    MonthlyTime

    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.

    TimeSpan

    True

    Named

    False

    False

    MonthlyDayNumber

    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.

    VBOMonthlyDayNumber

    True

    Named

    False

    False

    MonthlyDayOfWeek

    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.

    DayOfWeek

    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.

    SwitchParameter

    False

    Named

    False

    False

    ObjectStorageRepository

    Specifies object storage repository. The cmdlet will add this object storage repository to a backup repository.

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

    False

    Named

    False

    False

    ObjectStorageEncryptionKey

    Specifies object storage encryption key. Veeam Backup for Microsoft Office 365 will encrypt data, that is moved to object storage.

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

    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 Office 365 repository.

    Examples

    Add-VBORepositoryExample 1. Adding Backup Repository with Default Retention Policy Period

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

    $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

    Perform the following steps:

    1. Run the Get-VBOProxy cmdlet. Specify 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.
    • Specify the Name parameter value.
    • Specify the Path parameter value.
    • Set SnapshotBased as the RetentionType parameter value.

    Add-VBORepositoryExample 2. Adding Backup Repository with Yearly Retention Period [Policy Applied Daily]

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

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

    • The retention period is set to 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.

    $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

    Perform the following steps:

    1. Run the Get-VBOProxy cmdlet. Specify 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.
    • Specify the Name parameter value.
    • Specify the Description 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.

    Add-VBORepositoryExample 3. Adding Backup Repository with Yearly Retention Period [Policy Applied Monthly]

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

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

    • The retention period is 2 years.
    • 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.

    $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

    Perform the following steps:

    1. Run the Get-VBOProxy cmdlet. Specify the Hostname parameter value. Save the result to the $proxy variable.
    2. Run the Add-VBORepository cmdlet. Specify the following settings:
    • Specify the Name parameter value.
    • Specify the Description 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.

    Add-VBORepositoryExample 4. Adding Backup Repository with Custom Retention period [Policy Applied Daily]

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

    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.

    $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

    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 the $proxy variable as the Proxy parameter value.
    • Specify the Name parameter value.
    • Specify the Description 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.

    Add-VBORepositoryExample 5. Adding Backup Repository with Custom Retention period [Policy Applied Monthly]

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

    • The retention period 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.

    $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

    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 settings:
    • Set the $proxy variable as the Proxy parameter value.
    • Specify 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.

    Add-VBORepositoryExample 6. Expanding New Backup Repository with Object Storage Repository

    This example shows how to expand a new backup repository with object storage repository.

    $account = Get-VBOAzureBlobAccount -Id "133dae61-cfce-4fe0-8f8d-cbe52bd5612a"

    $connection = New-VBOAzureBlobServiceConnectionSettings -Account $account -RegionType Global

    $container = Get-VBOAzureBlobContainer -ConnectionSettings $connection

    $folder = Get-VBOAzureBlobFolder -Container $container

    $objectstorage = Add-VBOAzureBlobObjectStorageRepository -Folder $folder -Name "Music"

    $proxy = Get-VBOProxy -Name "Production proxy"

    Add-VBORepository -Proxy $proxy -Path C:\backups -Name "Azure Blob repository" -ObjectStorageRepository $objectStorage

    Perform the following steps:

    1. Create object storage repository.
    1. Run the Get-VBOAzureBlobAccount cmdlet. Save the result to the $account variable.
    2. Run the New-VBOAzureBlobServiceConnectionSettings cmdlet. Set the $account variable as the Account parameter value. Specify the RegionType parameter value. Save the result to the $connection variable.
    3. Run the Get-VBOAzureBlobContainer cmdlet. Set the $connection variable as the ConnectionSettings parameter value. Save the result to the $container variable.
    4. Run the Get-VBOAzureBlobFolder cmdlet. Set the $container variable as the Container parameter value. Save the result to the $folder variable.
    5. Run the Add-VBOAzureBlobObjectStorageRepository cmdlet. Set the $folder variable as the Folder parameter value. Specify the Name parameter value. Save the result to the $objectstorage variable.
    1. Run the Get-VBOProxy cmdlet. Specify the Name 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 Name parameter value.
    • Specify the Path parameter value.
    • Specify the Name parameter value.
    • Set the $objectStorage variable as the ObjectStorageRepository parameter value.

    Related Commands