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 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
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:
|
RetentionPeriodType | string | Specifies the retention period type:
|
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:
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:
|
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:
|
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:
|
MonthlyDayOfWeek | string | For monthly clean-up schedule. Specifies the day of the week when clean-up must be performed:
|
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/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", } |
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:
|
retentionPeriodType | string | Specifies the retention period type:
|
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/v5/backuprepositories/70401fe2-766e-4f2b-a810-9d9ee2655db8"}, "proxy": {"href": "https://abc.tech.local:4443/v5/proxies/1a087d00-12b2-4902-9b19-22faf05dc14a"} } } |