This is an archive version of the document. To get the most up-to-date information, see the current version.

Adding Backup Repositories

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

objectStorageId

string

Specifies the object storage ID.

objectStorageCachePath

string

Specifies a path to the directory of the backup repository on a backup proxy server.

objectStorageEncryptionEnabled

boolean

Defines if the object storage encryption is enabled.

encryptionKeyId

string

Specifies the encryption key ID.

name

string

Specifies the backup repository name.

description

string

Specifies the backup repository description.

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.

Note: This property is not required when extending a backup repository with an object storage.

retentionType

string

Specifies the type of the retention policy. The following types are available:

  • ItemLevel
  • SnapshotBased

retentionPeriodType

string

Specifies the retention period type. The following types are available:

  • Daily
  • Monthly
  • Yearly

retentionFrequencyType

string

Specifies clean-up schedule type. The following types are available:

  • Daily. Veeam Backup for Microsoft Office 365 checks and removes the outdated backups once a day. Use the dailyTime property to set the time of the day for performing clean-up. Use the dailyType property to set the days for performing clean-up.
  • Monthly. Veeam Backup for Microsoft Office 365 checks and removes the outdated backups once a month. Use the monthlyTime property to set the time of the day for performing clean-up. Use the monthlyDaynumber and monthlyDayofweek properties to set the day for performing clean-up.

dailyRetentionPeriod

integer

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

monthlyRetentionPeriod

integer

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

yearlyRetentionPeriod

string

Specifies the retention period in years. The following values are available:

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

This property is valid if retentionPeriodType is set to Yearly.

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

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. The following values are available:

  • 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. The following values are available:

  • First
  • Second
  • Third
  • Fourth
  • Last

monthlyDayofweek

string

For Monthly clean-up schedule.

Specifies the day of the week when clean-up must be performed. The following values are available:

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

proxyId

string

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

attachUsedRepository

boolean

Defines whether to add a backup repository that was associated with a different backup proxy.

If set to true, indicates that 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.

Request Example

The following example shows how to add a new backup repository extended with an 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:\\ABC_Repo",
  "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

Specifies the object storage ID.

objectStorageCachePath

string

Specifies a path to the directory of the backup repository on a backup proxy server.

objectStorageEncryptionEnabled

boolean

Defines if the object storage encryption is enabled.

encryptionKeyId

string

Specifies the encryption key ID.

isOutOfSync

boolean

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

capacityBytes

integer

Specifies the size of the backup repository in Bytes.

freeSpaceBytes

integer

Specifies the available space on the backup repository in Bytes.

id

string

Specifies the backup repository ID.

name

string

Specifies a name of the backup repository.

description

string

Specifies the backup repository description.

path

string

Specifies a path to the directory where backups are stored.

retentionType

string

Specifies the type of the retention policy. The following types are available:

  • ItemLevel
  • SnapshotBased

retentionPeriodType

string

Specifies the retention period type. The following types are available:

  • Daily
  • Monthly
  • Yearly

retentionFrequencyType

string

Specifies clean-up schedule type. The following types are available:

  • Daily. Veeam Backup for Microsoft Office 365 checks and removes the outdated backups once a day. Use the dailyTime property to set the time of the day for performing clean-up. Use the dailyType property to set the days for performing clean-up.
  • Monthly. Veeam Backup for Microsoft Office 365 checks and removes the outdated backups once a month. Use the monthlyTime property to set the time of the day for performing clean-up. Use the monthlyDaynumber and monthlyDayofweek properties to set the day for performing clean-up.

dailyRetentionPeriod

integer

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

monthlyRetentionPeriod

integer

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

yearlyRetentionPeriod

string

Specifies the retention period in years. The following values are available:

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

This property is valid if retentionPeriodType is set to Yearly.

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

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. The following values are available:

  • 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. The following values are available:

  • First
  • Second
  • Third
  • Fourth
  • Last

monthlyDayofweek

string

For Monthly clean-up schedule.

Specifies the day of the week when clean-up must be performed. The following values are available:

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

proxyId

string

Specifies the backup proxy ID.

_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:\\ABC_Repo",

  "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": "v5/backuprepositories/70401fe2-766e-4f2b-a810-9d9ee2655db8"},

     "proxy": {"href": "v5/proxies/1a087d00-12b2-4902-9b19-22faf05dc14a"}

  }

}