Adding Backup Repositories

In this article

    You can add an on-premises backup repository to Veeam Backup for Microsoft Office 365.

    When adding a backup repository, you can set a retention type under which to keep your data. For more information about the retention types, see the Retention Policy section of the Veeam Backup for Microsoft Office 365 User Guide.

    You can set the retention period for a backup repository in years, months or days. Backup jobs targeted to this repository will back up organization items that were created or modified within the indicated retention period. For example, if you set the retention period to 11 months, the backup job will back up all items that were created or modified 11 months ago or later. When an item’s age exceeds the retention, it is deleted.

    Additionally, you can configure a clean-up schedule to check backups in the repository and remove the outdated ones. Depending on how frequently you want to perform a clean-up you can set a daily or monthly schedule. For each clean-up schedule type, you can specify the clean-up day and time.

    You can also extend a backup repository with object storage. For more information about object storage, see the Object Storage Repositories section of the Veeam Backup for Microsoft Office 365 User Guide.

    Request

    POST https://<hostname>:4443/v5/BackupRepositories

    Request Headers

    The request header must contain an authorization token of the current session.

    Request Body

    The following table lists available request properties:

    Property

    Type

    Description

    name

    string

    Specifies the name of a backup repository.

    proxyId

    string

    Specifies the ID of a backup proxy. Veeam Backup for Microsoft Office 365 will add backup repository to this proxy.

    path

    string

    Specifies the full path to the folder where the backups will be stored. If the target folder does not exist, Veeam Backup for Microsoft Office 365 creates it.

    Important! Is not required when extending a backup repository with object storage.

    description

    string

    Specifies the description of the backup repository.

    retentionType

    retentionType

    Specifies the type of the retention policy:

    • ItemLevel
    • SnapshotBased

    retentionPeriodType

    string

    Specifies the retention period type:

    • Daily
    • Monthly
    • Yearly

    dailyRetentionPeriod

    string

    Specifies the retention period in days. This property is valid if retentionPeriodType is set to Daily.

    monthlyRetentionPeriod

    string

    Specifies the retention period in months. This property is valid if retentionPeriodType is set to Monthly.

    yearlyRetentionPeriod

    string

    Specifies the retention period in years:

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

    This property is valid if retentionPeriodType is set to Yearly.

    If you select Keep, the backup job will back up all selected items and will never remove them.

    retentionFrequencyType

    string

    Specifies clean-up schedule type:

    • Daily: to check and remove the outdated backups once a day. Use dailyTime property to set the time of the day for performing clean-up. Use dailyType property to set the days for performing clean-up.
    • Monthly: to check and remove the outdated backups once a month. Use monthlyTime property to set the time of the day for performing clean-up. Use monthlyDayNumber and monthlyDayOfWeek properties to set the day for performing clean-up.

    dailyTime

    UTC

    For daily clean-up schedule.

    Specifies the time of the day when clean-up must be performed.

    For example, "dailyTime": "08:00:00".

    dailyType

    string

    For daily clean-up schedule.

    Specifies the days when clean-up must be performed:

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

    monthlyTime

    UTC

    For monthly clean-up schedule.

    Specifies the time of the day when clean-up must be performed.

    monthlyDayNumber

    string

    For monthly clean-up schedule.

    Specifies the order number for the day of the week when clean-up must be performed:

    • First
    • Second
    • Third
    • Fourth
    • Last

    monthlyDayOfWeek

    string

    For monthly clean-up schedule.

    Specifies the day of the week when clean-up must be performed:

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

    attachUsedRepository

    boolean

    Adds a backup repository that was associated with a different backup proxy.

    If set to true, Veeam Backup for Microsoft Office 365 will assign a backup repository with backups to the backup proxy with the specified ID and add it to the backup infrastructure.

    objectStorageId

    string

    An identification number of object storage.

    objectStorageCachePath

    string

    A path to a repository directory on a backup proxy server.

    objectStorageEncryptionEnabled

    boolean

    Specifies if the encryption is enabled.

    encryptionKeyId

    string

    Specifies the encryption key identification number.

    Request Example

    The following example shows how to add a new backup repository extended with object storage.

    Request:

    POST https://abc.tech.local:4443/v5/BackupRepositories

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

      "name": "ABC Support",

      "proxyId": "1a087d00-12b2-4902-9b19-22faf05dc14a",

      "retentionPeriodType": "Daily",

      "dailyRetentionPeriod": 14,

      "retentionFrequencyType": "Daily",

      "dailyTime": "08:00:00",

      "description": "",

      "retentionType": "ItemLevel",

      "dailyType": "Weekends",

      "attachUsedRepository": true,

      "objectStorageId": "62184b76-b935-42a9-868e-d55e83f052fa",
      "objectStorageCachePath": "C:\\repos\\1",
      "objectStorageEncryptionEnabled": true,
      "encryptionKeyId": "428fbab8-264a-4452-888f-9bb97775307b",

    }

    Response

    Response Codes

    A successfully completed operation returns a response code 201 Created.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the response body message: application/json; charset=utf-8

    Response Body

    The response contains the following information:

    Property

    Type

    Description

    objectStorageId

    string

    An identification number of object storage.

    objectStorageCachePath

    string

    A path to a repository directory on a backup proxy server.

    objectStorageEncryptionEnabled

    boolean

    Specifies if the encryption is enabled.

    encryptionKeyId

    string

    Specifies the encryption key identification number.

    isOutOfSync

    boolean

    Specifies if a backup proxy server needs to be synchronized with object storage to get the same cache state.

    capacityBytes

    integer

    The size of a backup repository in Bytes.

    freeSpaceBytes

    integer

    Show the available space on a backup repository in Bytes.

    id

    string

    An identification number of a backup repository.

    name

    string

    A backup repository name.

    description

    string

    A backup repository description.

    path

    string

    A path to the directory where backups are stored.

    retentionType

    string

    Specifies the type of the retention policy:

    • ItemLevel
    • SnapshotBased

    retentionPeriodType

    string

    Specifies the retention period type:

    • Daily
    • Monthly
    • Yearly

    dailyRetentionPeriod

    integer

    Specifies the retention period in days. This property is valid if retentionPeriodType is set to Daily.

    retentionFrequencyType

    string

    Specifies the retention period in months. This property is valid if retentionPeriodType is set to Monthly.

    dailyTime

    UTC

    For daily clean-up schedule. Specifies the time of the day when clean-up must be performed.

    dailyType

    string

    For daily clean-up schedule. Specifies the days when clean-up must be performed.

    proxyId

    string

    A backup proxy server identification number.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    Response Example

    Response:

    201 Created

     

    Response Body:

    {

      "objectStorageId": "62184b76-b935-42a9-868e-d55e83f052fa",

      "objectStorageCachePath": "C:\\repos\\1",

      "objectStorageEncryptionEnabled": true,

      "encryptionKeyId": "428fbab8-264a-4452-888f-9bb97775307b",

      "isOutOfSync": false,

      "capacityBytes": 135996108800,

      "freeSpaceBytes": 107011002368,

      "id": "70401fe2-766e-4f2b-a810-9d9ee2655db8",

      "name": "ABC Support",

      "description": "",

      "path": "",

      "retentionType": "ItemLevel",

      "retentionPeriodType": "Daily",

      "dailyRetentionPeriod": 14,

      "retentionFrequencyType": "Daily",

      "dailyTime": "08:00:00",

      "dailyType": "Weekends",

      "proxyId": "1a087d00-12b2-4902-9b19-22faf05dc14a",

      "_links":    {

         "self": {"href": "https://abc.tech.local:4443/v5/backuprepositories/70401fe2-766e-4f2b-a810-9d9ee2655db8"},

         "proxy": {"href": "https://abc.tech.local:4443/v5/proxies/1a087d00-12b2-4902-9b19-22faf05dc14a"}

      }

    }