Creating Backup Jobs

This section explains how to create a backup job for the organization with the specified ID.

Request

POST https://<hostname>:4443/v4/Organizations/{organizationId}/Jobs

Request Headers

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

Request Parameters

The following parameters must be posted as URL.

Parameter

Type

Description

organizationId

string

An identification number of the organization.

Request Body

The request body must contain the following properties:

Property

Type

Description

Name

string

Specifies the name of the backup job.

Description

string

Specifies the description of the backup job.

BackupType

backupType

Specifies the type of the backup job:

  • entireOrganization
  • selectedItems

SchedulePolicy

SchedulePolicy

Specifies the backup job scheduling options.

ProxyId

string

Specifies the ID of the backup proxy where the repository with backups is located.

RepositoryId

string

Specifies the ID of the repository where the organization backups will be stored.

RunNow

boolean

If set to True, the job will run right after it is created.

SchedulePolicy

Specify the following properties for the backup job schedule:

Property

Type

Description

Type

string

Specifies the job schedule type:

  • Daily: runs the backup job on specific days.
  • Periodically: runs the backup job repeatedly throughout a day with a specific time interval.

DailyType

string

Specifies the days when the backup job will run:

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

DailyTime

UTC

Specifies the time when the job will start.

PeriodicInterval

string

Specifies the time interval between the job runs:

  • Minutes5
  • Minutes10
  • Minutes15
  • Minutes30
  • Hours1
  • Hours2
  • Hours4
  • Hours8

BackupWindowEnabled

boolean

If set to True, indicates that a backup window feature is enabled for this job.

BackupWindowSettings

BackupWindowSettings

Specifies the job's backup window settings. A backup window is a time period within which the job must be completed.

RetryEnabled

boolean

If set to True, indicates that Veeam Backup for Microsoft Office 365 will attempt to restart a backup job if it fails for some reason.

RetryNumber

int

Specifies the number of attempts to run the backup job.

RetryWait
Interval

int

Specifies the time intervals between the job retry attempts (minutes).

For example:

"schedulePolicy": {

     "backupWindowEnabled": true,

     "backupWindowSettings": {

       "backupWindow": [

         true,

         true,

         true,

         ..

         true

       ],

       "minuteOffset": 0

     },

     "type": "Daily",

     "dailyType": "Wednesday",

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

     "retryEnabled": true,

     "retryNumber": 3,

     "retryWaitInterval": 10

   },

BackupWindowSettings

Specify the following property for the job's backup window:

Property

Type

Description

BackupWindow

boolean

Specifies an hourly scheme for the backup window. The scheduling scheme consists of 168 boolean elements. These elements can be logically divided into 7 groups by 24. Each group represents a day of the week starting from Sunday. Each element represents a backup hour:

  • True — the allowed backup hour
  • False — the prohibited backup hour

MinuteOffset

int

Specifies the current minute offset from the UTC time.

For example:

 "backupWindowSettings": {

    "backupWindow": [

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         true,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false,

         false

       ],

     }

Response

The server returns the following response to the client.

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

In the response body, the server returns a representation of the /Organizations/{organizationId}/Jobs resource. The resource has the following URL: /Jobs/{id}.

Example 1

The example below shows how to backup an entire organization with ID 9b538005-3e78-4253-a84e-cc40630747cd.

Request:

POST https://abc.tech.local:4443/v4/Organizations/9b538005-3e78-4253-a84e-cc40630747cd/Jobs

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

   "name": "job office365",

   "description": "",

   "backupType": "EntireOrganization",

   "schedulePolicy": {

     "backupWindowEnabled": false,

     "type": "Daily",

     "dailyType": "Everyday",

     "dailyTime": "01:00:00",

     "retryEnabled": true,

     "retryNumber": 3,

     "retryWaitInterval": 10

   },

 "RepositoryId": "2c9079b0-76b4-415f-bca8-de1450cedf79"

}

 

Response:

201 Created

 

Response Body:

{

 "id": "e8e3e9d5-29ba-41e6-bab7-25387149141f",

 "name": "job office365",

 "description": "",

 "nextRun": "2017-06-01T08:00:00Z",

 "isEnabled": true,

 "backupType": "EntireOrganization",

 "lastStatus": "Stopped",

 "schedulePolicy": {

   "backupWindowEnabled": false,

   "type": "Daily",

   "dailyType": "Everyday",

   "dailyTime": "01:00:00",

   "retryEnabled": true,

   "retryNumber": 3,

   "retryWaitInterval": 10

 },

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v4/jobs/e8e3e9d5-29ba-41e6-bab7-25287149141f"

   },

   "organization": {

     "href": "https://abc.tech.local:4443/v4/organizations/9b538005-3e68-4263-a84e-cc40630747be"

   },

   "backupRepository": {

     "href": "https://abc.tech.local:4443/v4/backuprepositories/ce18de31-329d-4f0f-b85e-4424cc2e6821"

   },

   "jobsessions": {

     "href": "https://abc.tech.local:4443/v4/jobs/e8e3e9d5-29ba-42e6-bab7-25387149141f/jobsessions"

   },

   "excludedItems": {

     "href": "https://abc.tech.local:4443/v4/jobs/e8e3e9d5-29ba-41e6-bab7-25387149141f/excludedItems"

   }

 }

}

Example 2

The example below shows how to backup selected items of an organization with ID 9b538005-3e78-4253-a84e-cc40630747cd.

Request:

POST https://abc.tech.local:4443/v4/Organizations/9b538005-3e78-4253-a84e-cc40630747cd/Jobs

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

   "name": "job SelectedItems office365",

   "description": "",

   "nextRun": "2017-05-29T22:00:00Z",

   "isEnabled": true,

   "backupType": "SelectedItems",

 "SelectedItems":

 [

  {

   "Type": "PartialOrganization",

   "Mailbox": true,

   "ArchiveMailbox": true,

   "OneDrive": true,

   "Site": true

  },

  {

   "Type": "User",

   "User": {

      "id": "b583d2b8-c143-4b98-a769-fc95ebaa45f600000000-0000-0000-0000-000000000000",

      "displayName": "USER1",

      "name": "USER1@organization.onmicrosoft.com",

      "type": "User",

      "isBackedUp": false

   },

   "Mailbox": true,

   "ArchiveMailbox": true,

   "OneDrive": true,

   "Site": true

  },

  {

   "Type": "Group",

   "Group": {

     "id": "ca4b3d46-640f-4353-b59b-5beff743ca4c00000000-0000-0000-0000-000000000000",

     "displayName": "user 1550",

     "name": "user1550@organization.onmicrosoft.com",

     "managedBy": "USER1",

     "site": "https://organization.sharepoint.com/sites/SomeSite",

     "type": "Office365",

     "locationType": "Cloud",

     "isBackedup": false

   },

   "Members": true,

   "MemberMail": true,

   "MemberArchive": false,

   "MemberOnedrive": true,

   "MemberSite": false,

   "Mail": true,

   "Site": false

  },

  {

   "Type": "Site",

   "Site": {

     "id": "94f50108-75b4-4a5e-89ae-5651ee1e3975fdc607c4-6ac6-47d9-a1f3-cbdbc9766174",

     "url": "https://organization.sharepoint.com/sites/group2",

     "name": "Group 2",

     "isCloud": true,

     "title": "Group 2",

     "isBackedup": false,

     "isAvailable": true,

   }

  }

 ],

   "schedulePolicy": {

     "backupWindowEnabled": false,

     "type": "Daily",

     "dailyType": "Everyday",

     "dailyTime": "01:00:00",

     "retryEnabled": true,

     "retryNumber": 3,

     "retryWaitInterval": 10

   },

 "RepositoryId": "2c9079b0-76b4-415f-bca8-de1450cedf89"

}

 

Response:

201 Created

 

Response Body:

{

 "id": "e8e3e9d5-29ba-41e6-bab7-25387149141f",

 "name": "job office365",

 "description": "",

 "nextRun": "2017-06-01T08:00:00Z",

 "isEnabled": true,

 "backupType": "EntireOrganization",

 "lastStatus": "Stopped",

 "schedulePolicy": {

   "backupWindowEnabled": false,

   "type": "Daily",

   "dailyType": "Everyday",

   "dailyTime": "01:00:00",

   "retryEnabled": true,

   "retryNumber": 3,

   "retryWaitInterval": 10

 },

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v4/jobs/e8e3e9d5-29ba-41e6-bab7-25287149141f"

   },

   "organization": {

     "href": "https://abc.tech.local:4443/v4/organizations/9b538005-3e68-4263-a84e-cc40630747be"

   },

   "backupRepository": {

     "href": "https://abc.tech.local:4443/v4/backuprepositories/ce18de31-329d-4f0f-b85e-4424cc2e6821"

   },

   "jobsessions": {

     "href": "https://abc.tech.local:4443/v4/jobs/e8e3e9d5-29ba-42e6-bab7-25387149141f/jobsessions"

   },

   "excludedItems": {

     "href": "https://abc.tech.local:4443/v4/jobs/e8e3e9d5-29ba-41e6-bab7-25387149141f/excludedItems"

   }

 }

}

I want to report a typo

There is a misspelling right here:

 

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