Adding Backup Repositories

This section explains how to 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 Understanding 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/v4/BackupRepositories

Request Headers

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

Request Body

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 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 a specified ID and add it to the backup infrastructure.

ObjectStorageId

int

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.

POST https://abc.tech.local:4443/v4/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

Property

Type

Description

ObjectStorageId

int

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

int

The size of a backup repository in Bytes.

freeSpaceBytes

int

Show the available space on a backup repository in Bytes.

id

int

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

int

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

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

  }

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.