Mass Deployment

You can perform mass deployment of your backup infrastructure with the Automation section of the REST API. The section includes methods that let you import and export resources in the JSON format. You can use these methods, for example, to set up your backup infrastructure from a JSON specification or to migrate your infrastructure from one backup server to another.

The Automation section contains separate methods for resource endpoints, so you can export and import resources granularly. For more information on the automation methods, see the REST API Reference.

Exporting Resources

Exported resources do not include IDs. All credentials are exported with empty passwords, passphrases and private keys. Before you export resources that contain sensitive data, you can mark them by using tag parameters.

Importing Resources

As soon as you can import an entire collection of resources with one HTTP request, you may need to check the progress of the import operation. In response to your request, you receive a session. Within this session, Veeam Backup & Replication adds the specified objects to the backup infrastructure. To check the import progress, you can track the session state. For more information, see Tracking Import Operation.

To set up backup infrastructure using the automation methods, you must import resources in the following order:

  1. Credentials and encryption passwords
  2. Managed servers
  3. Backup repositories
  4. Backup proxies
  5. Backup jobs

Example

In this example, you will migrate backup infrastructure from one backup server to another. You have a backup server backupserver01 where a VMware vSphere infrastructure is deployed. It includes managed Microsoft Windows and Linux servers, backup repositories and backup proxies, and configured backup jobs. You need to migrate the infrastructure to another backup server backupserver02.

To migrate backup infrastructure from backupserver01 to backupserver02,take the following steps:

  1. To log in to backupserver01 and backupserver02, send the HTTP POST requests to the /api/oauth2/token paths. In response, you receive access and refresh tokens.

For more information, see Requesting Authorization.

  1. Export credentials records from backupserver01.

Mass DeploymentRequest Example

Request

POST https://backupserver01:9419/api/v1/automation/credentials/export

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{}

In response, you receive an array of credentials records. Each record contains empty values of sensitive parameters: passwords, passphrases and private keys.

Mass DeploymentResponse Example

Response

200

 

Response Body

{

   "credentials": [

       {

           "type": "Linux",

           "username": "username01",

           "password": "",

           "description": "Linux account",

           "tag": "main-linux-credentials",

           "linuxAdditionalSettings": {

               "SSHPort": 22,

               "autoElevated": true,

               "addToSudoers": false,

               "useSu": false,

               "privateKey": "",

               "passphrase": "",

               "rootPassword": ""

           }

       },

       {

           "type": "Linux",

           "username": "linux01",

           "password": "",

           "description": "Linux account",

           "tag": "linux01",

           "linuxAdditionalSettings": {

               "SSHPort": 22,

               "autoElevated": false,

               "addToSudoers": false,

               "useSu": false,

               "privateKey": "",

               "passphrase": "",

               "rootPassword": ""

           }

       }

       {

           "type": "Standard",

           "username": "tech\\username02",

           "password": "",

           "description": "Domain account",

           "tag": "main-domain-credentials",

           "linuxAdditionalSettings": null

       },

       {

           "type": "Standard",

           "username": "srv05\\username03",

           "password": "",

           "description": "srv05 account",

           "tag": "main-standard-credentials",

           "linuxAdditionalSettings": null

       

   ]

}

  1. Import the credentials to backupserver02. In the request body, specify the imported credentials. Fill in passwords, passphrases and private keys manually.

Mass DeploymentRequest Example

Request

POST https://backupserver02:9419/api/v1/automation/credentials/import

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{

   "credentials": [

       {

           "type": "Linux",

           "username": "username01",

           "password": "my_linux_password",

           "description": "Linux account",

           "tag": "main-linux-credentials",

           "linuxAdditionalSettings": {

               "SSHPort": 22,

               "autoElevated": true,

               "addToSudoers": false,

               "useSu": false,

               "privateKey": "",

               "passphrase": "",

               "rootPassword": ""

           }

       },

       {

           "type": "Linux",

           "username": "linux01",

           "password": "my_linux_password",

           "description": "Linux account",

           "tag": "linux01",

           "linuxAdditionalSettings": {

               "SSHPort": 22,

               "autoElevated": false,

               "addToSudoers": false,

               "useSu": false,

               "privateKey": "EDFACBD891354D5FF3A8CDC0C4488612",

               "passphrase": "my_private_key_password",

               "rootPassword": "my_linux_root_password"

           }

       }

       {

           "type": "Standard",

           "username": "tech\\username02",

           "password": "my_windows_password",

           "description": "Domain account.",

           "tag": "main-domain-credentials",

           "linuxAdditionalSettings": null

       },

       {

           "type": "Standard",

           "username": "srv05\\username03",

           "password": "my_windows_password",

           "description": "srv05 account",

           "tag": "main-standard-credentials",

           "linuxAdditionalSettings": null

       

   ]

}

In response, you receive an automation session. Within the session, the specified credentials are created on backupserver02. For more information on tracking the session state, see Tracking Import Operation.

  1. Export servers managed by backupserver01.

Mass DeploymentRequest Example

Request

POST https://backupserver01:9419/api/v1/automation/managedServers/export

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{}

In response, you receive an array of servers. The array does not include backupserver01 itself — the server where Veeam Backup & Replication is installed.

Mass DeploymentResponse Example

Response

200

 

Response Body

{

   "windowsHosts": [],

   "linuxHosts": [

       {

           "type": "LinuxHost",

           "name": "enterprise05.tech.local",

           "description": "Created by REST API",

           "credentials": {

               "credentialsName": "username01",

               "credentialsTag": "main-linux-credentials"

           },

           "sshSettings": {

               "sshTimeOutMs": 20000,

               "portRangeStart": 2500,

               "portRangeEnd": 3300,

               "serverThisSide": false,

               "managementPort": 6162

           },

           "sshFingerprint": "ssh-rsa a9:8d:82:e6:2e:1a:d7:0a:44:5a:b0:14:22:f1:b8:e8"

       }

   ],

   "viHosts": [

       {

           "type": "ViHost",

           "viHostType": "VC",

           "name": "vcenter01.tech.local",

           "description": "",

           "credentials": {

               "credentialsName": "tech\\username02",

               "credentialsTag": "main-domain-credentials"

           },

           "port": 443,

           "certificateThumbprint": "9A60A379FAA0F1359C2696A0E20C0DA03D539E0A"

       },

       {

           "type": "ViHost",

           "viHostType": "VC",

           "name": "vcenter02.tech.local",

           "description": "Added by REST",

           "credentials": {

               "credentialsName": "tech\\username02",

               "credentialsTag": "main-domain-credentials"

           },

           "port": 443,

           "certificateThumbprint": "B551C4433DA504184FBFDC370585E2F7B19EB0A4"

       }

   ]

}

  1. Import managed servers to backupserver02. In the request body, specify the array of servers exported from backupserver01.

Mass DeploymentRequest Example

Request

POST https://backupserver02:9419/api/v1/automation/managedServers/import

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{

   "windowsHosts": [],

   "linuxHosts": [

       {

           "type": "LinuxHost",

           "name": "enterprise05.tech.local",

           "description": "Created by REST API",

           "credentials": {

               "credentialsName": "username01",

               "credentialsTag": "main-linux-credentials"

           },

           "sshSettings": {

               "sshTimeOutMs": 20000,

               "portRangeStart": 2500,

               "portRangeEnd": 3300,

               "serverThisSide": false,

               "managementPort": 6162

           },

           "sshFingerprint": "ssh-rsa a9:8d:82:e6:2e:1a:d7:0a:44:5a:b0:14:22:f1:b8:e8"

       }

   ],

   "viHosts": [

       {

           "type": "ViHost",

           "viHostType": "VC",

           "name": "vcenter01.tech.local",

           "description": "",

           "credentials": {

               "credentialsName": "tech\\username02",

               "credentialsTag": "main-domain-credentials"

           },

           "port": 443,

           "certificateThumbprint": "9A60A379FAA0F1359C2696A0E20C0DA03D539E0A"

       },

       {

           "type": "ViHost",

           "viHostType": "VC",

           "name": "vcenter02.tech.local",

           "description": "Added by REST",

           "credentials": {

               "credentialsName": "tech\\username02",

               "credentialsTag": "main-domain-credentials"

           },

           "port": 443,

           "certificateThumbprint": "B551C4433DA504184FBFDC370585E2F7B19EB0A4"

       }

   ]

}

In response, you receive an automation session. Within the session, the specified servers are added to the backupserver02 infrastructure. For more information on tracking the session state, see Tracking Import Operation.

  1. Export backup repositories from backupserver01.

Mass DeploymentRequest Example

Request

POST https://backupserver01:9419/api/v1/automation/repositories/export

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{}

In response, you receive an array of backup repositories.

Mass DeploymentResponse Example

Response

200

 

Response Body

{

   "WindowsLocalRepositories": [

       {

           "type": "WinLocal",

           "name": "Main Big Repository",

           "description": "Created by REST API",

           "tag": "9FE108322924417FB67582B9004CEF61",

           "hostName": "srv04.tech.local",

           "repository": {

               "path": "D:\\Backups",

               "maxTaskCount": 8,

               "readWriteRate": 0,

               "advancedSettings": {

                   "alignDataBlocks": false,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": true,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ],

   "LinuxLocalRepositories": [

       {

           "type": "LinuxLocal",

           "name": "Linux Direct Backup Repository 1",

           "description": "Created by REST API",

           "tag": "7365D8BED68B4CEA803FBA7414B3F01D",

           "hostName": "enterprise05.tech.local",

           "repository": {

               "path": "/backups",

               "maxTaskCount": 4,

               "readWriteRate": 0,

               "useFastCloningOnXFSVolumes": false,

               "useImmutableBackups": false,

               "makeRecentBackupsImmutableDays": 7,

               "advancedSettings": {

                   "alignDataBlocks": true,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": false,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ],

   "SmbRepositories": [

       {

           "type": "Smb",

           "name": "Backup Repository SMB",

           "description": "Created by REST API",

           "tag": "08C739C306774C44A2D504D36ACCC798",

           "share": {

               "sharePath": "\\\\srv05.tech.local\\Share",

               "credentials": {

                   "credentialsName": "srv05\\username03",

                   "credentialsTag": "main-standard-credentials"

               },

               "gatewayServer": {

                   "autoSelect": true,

                   "gatewayServerName": null

               }

           },

           "repository": {

               "maxTaskCount": 4,

               "readWriteRate": 0,

               "advancedSettings": {

                   "alignDataBlocks": true,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": true,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ],

   "NfsRepositories": [

       {

           "type": "Nfs",

           "name": "Linux NFS Backup Repository 1",

           "description": "Created by REST API",

           "tag": "2E9D8E8F0A8A4A449E2152701B258D47",

           "share": {

               "sharePath": "enterprise05.tech.local:/var/nfs/general",

               "gatewayServer": {

                   "autoSelect": true,

                   "gatewayServerName": null

               }

           },

           "repository": {

               "maxTaskCount": 4,

               "readWriteRate": 0,

               "advancedSettings": {

                   "alignDataBlocks": true,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": false,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ]

}

  1. Import backup repositories to backupserver02. In the request body, specify the repositories exported from backupserver01.

Mass DeploymentRequest Example

Request

POST https://backupserver02:9419/api/v1/automation/repositories/import

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{

   "WindowsLocalRepositories": [

       {

           "type": "WinLocal",

           "name": "Main Big Repository",

           "description": "Created by REST API",

           "tag": "9FE108322924417FB67582B9004CEF61",

           "hostName": "srv04.tech.local",

           "repository": {

               "path": "D:\\Backups",

               "maxTaskCount": 8,

               "readWriteRate": 0,

               "advancedSettings": {

                   "alignDataBlocks": false,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": true,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ],

   "LinuxLocalRepositories": [

       {

           "type": "LinuxLocal",

           "name": "Linux Direct Backup Repository 1",

           "description": "Created by REST API",

           "tag": "7365D8BED68B4CEA803FBA7414B3F01D",

           "hostName": "enterprise05.tech.local",

           "repository": {

               "path": "/backups",

               "maxTaskCount": 4,

               "readWriteRate": 0,

               "useFastCloningOnXFSVolumes": false,

               "useImmutableBackups": false,

               "makeRecentBackupsImmutableDays": 7,

               "advancedSettings": {

                   "alignDataBlocks": true,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": false,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ],

   "SmbRepositories": [

       {

           "type": "Smb",

           "name": "Backup Repository SMB",

           "description": "Created by REST API",

           "tag": "08C739C306774C44A2D504D36ACCC798",

           "share": {

               "sharePath": "\\\\srv05.tech.local\\Share",

               "credentials": {

                   "credentialsName": "srv05\\username03",

                   "credentialsTag": "main-standard-credentials"

               },

               "gatewayServer": {

                   "autoSelect": true,

                   "gatewayServerName": null

               }

           },

           "repository": {

               "maxTaskCount": 4,

               "readWriteRate": 0,

               "advancedSettings": {

                   "alignDataBlocks": true,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": true,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ],

   "NfsRepositories": [

       {

           "type": "Nfs",

           "name": "Linux NFS Backup Repository 1",

           "description": "Created by REST API",

           "tag": "2E9D8E8F0A8A4A449E2152701B258D47",

           "share": {

               "sharePath": "enterprise05.tech.local:/var/nfs/general",

               "gatewayServer": {

                   "autoSelect": true,

                   "gatewayServerName": null

               }

           },

           "repository": {

               "maxTaskCount": 4,

               "readWriteRate": 0,

               "advancedSettings": {

                   "alignDataBlocks": true,

                   "decompressBeforeStoring": false,

                   "rotatedDrives": false,

                   "perVmBackup": false

               }

           },

           "mountServer": {

               "mountServerName": "srv04.tech.local",

               "writeCacheFolder": "D:\\ProgramData\\Veeam\\Backup\\",

               "vPowerNFSEnabled": false,

               "vPowerNFSPortSettings": {

                   "mountPort": 1058,

                   "vPowerNFSPort": 1058

               }

           }

       }

   ]

}

In response, you receive an automation session. Within the session, the specified backup repositories are added to the backupserver02 infrastructure. For more information on tracking the session state, see Tracking Import Operation.

  1. If you use backup proxies and encryption keys in your backup jobs, migrate them similarly.
  2. Export backup jobs from backupserver01.

Mass DeploymentRequest Example

Request

POST https://backupserver02:9419/api/v1/automation/jobs/export

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{}

In response, you receive an array of jobs.

Mass DeploymentResponse Example

Response

200

 

Response Body

{

   "jobs": [

       {

           "type": "Backup",

           "name": "Backup Job 2",

           "description": "Created by REST API",

           "isHighPriority": false,

           "virtualMachines": {

               "includes": [

                   {

                       "type": "ResourcePool",

                       "hostName": "vcenter02.tech.local",

                       "name": "likhtarovich",

                       "objectId": "resgroup-32774"

                   }

               ],

               "excludes": {

                   "vms": [],

                   "disks": [

                       {

                           "disksToProcess": "AllDisks",

                           "vmObject": {

                               "type": "ResourcePool",

                               "hostName": "vcenter02.tech.local",

                               "name": "likhtarovich",

                               "objectId": "resgroup-32774"

                           },

                           "disks": [],

                           "removeFromVMConfiguration": true

                       }

                   ],

                   "templates": {

                       "isEnabled": true,

                       "excludeFromIncremental": true

                   }

               }

           },

           "storage": {

               "backupRepository": {

                   "name": "Main Big Repository",

                   "tag": "9FE108322924417FB67582B9004CEF61"

               },

               "backupProxies": {

                   "automaticSelection": true,

                   "proxies": []

               },

               "retentionPolicy": {

                   "type": "RestorePoints",

                   "quantity": 7

               },

               "gfsPolicy": {

                   "isEnabled": false,

                   "weekly": {

                       "desiredTime": "sunday",

                       "isEnabled": false,

                       "keepForNumberOfWeeks": 1

                   },

                   "monthly": {

                       "desiredTime": "First",

                       "isEnabled": false,

                       "keepForNumberOfMonths": 1

                   },

                   "yearly": {

                       "desiredTime": "January",

                       "isEnabled": false,

                       "keepForNumberOfYears": 1

                   }

               },

               "advancedSettings": {

                   "backupModeType": "Incremental",

                   "synthenticFulls": {

                       "isEnabled": true,

                       "days": [

                           "saturday"

                       ]

                   },

                   "activeFulls": {

                       "isEnabled": false,

                       "weekly": {

                           "isEnabled": true,

                           "days": [

                               "saturday"

                           ]

                       },

                       "monthly": {

                           "dayOfWeek": "monday",

                           "dayNumberInMonth": "First",

                           "isEnabled": false,

                           "dayOfMonths": 1,

                           "months": [

                               "January",

                               "February",

                               "March",

                               "April",

                               "May",

                               "June",

                               "July",

                               "August",

                               "September",

                               "October",

                               "November",

                               "December"

                           ]

                       }

                   },

                   "backupHealth": {

                       "isEnabled": true,

                       "weekly": {

                           "isEnabled": false,

                           "days": [

                               "friday"

                           ]

                       },

                       "monthly": {

                           "dayOfWeek": "monday",

                           "dayNumberInMonth": "First",

                           "isEnabled": true,

                           "dayOfMonths": 1,

                           "months": [

                               "March",

                               "July",

                               "November"

                           ]

                       }

                   },

                   "fullBackupMaintenance": {

                       "RemoveData": {

                           "isEnabled": false,

                           "afterDays": 14

                       },

                       "defragmentAndCompact": {

                           "isEnabled": false,

                           "weekly": {

                               "isEnabled": false,

                               "days": [

                                   "saturday"

                               ]

                           },

                           "monthly": {

                               "dayOfWeek": "saturday",

                               "dayNumberInMonth": "Last",

                               "isEnabled": true,

                               "dayOfMonths": 1,

                               "months": [

                                   "January",

                                   "February",

                                   "March",

                                   "April",

                                   "May",

                                   "June",

                                   "July",

                                   "August",

                                   "September",

                                   "October",

                                   "November",

                                   "December"

                               ]

                           }

                       }

                   },

                   "storageData": {

                       "compressionLevel": "Optimal",

                       "storageOptimization": "LocalTarget",

                       "enableInlineDataDedup": true,

                       "excludeSwapFileBlocks": true,

                       "excludeDeletedFileBlocks": true,

                       "encryption": {

                           "isEnabled": false,

                           "encryptionPasswordIdOrNull": "00000000-0000-0000-0000-000000000000",

                           "encryptionPasswordTag": null

                       }

                   },

                   "notifications": {

                       "sendSNMPNotifications": false,

                       "emailNotifications": {

                           "notificationType": null,

                           "isEnabled": false,

                           "recipients": [],

                           "customNotificationSettings": null

                       },

                       "vmAttribute": {

                           "isEnabled": false,

                           "notes": "Notes",

                           "appendToExisitingValue": true

                       }

                   },

                   "vSphere": {

                       "enableVMWareToolsQuiescence": false,

                       "changedBlockTracking": {

                           "isEnabled": true,

                           "enableCBTautomatically": true,

                           "resetCBTonActiveFull": true

                       }

                   },

                   "storageIntegration": {

                       "isEnabled": true,

                       "limitProcessedVm": false,

                       "limitProcessedVmCount": 10,

                       "failoverToStandardBackup": false

                   },

                   "scripts": {

                       "periodicityType": "BackupSessions",

                       "preCommand": {

                           "isEnabled": false,

                           "command": ""

                       },

                       "postCommand": {

                           "isEnabled": false,

                           "command": ""

                       },

                       "runScriptEvery": 1,

                       "dayOfWeek": [

                           "saturday"

                       ]

                   }

               }

           },

           "guestProcessing": {

               "applicationAwareProcessing": {

                   "isEnabled": false,

                   "appSettings": []

               },

               "guestFileSystemIndexing": {

                   "isEnabled": true,

                   "indexingSettings": [

                       {

                           "vmObject": {

                               "type": "ResourcePool",

                               "hostName": "vcenter02.tech.local",

                               "name": "likhtarovich",

                               "objectId": "resgroup-32774"

                           },

                           "WindowsIndexing": {

                               "guestFSIndexingMode": "indexAllExcept",

                               "indexingList": [

                                   "%windir%",

                                   "%ProgramFiles%",

                                   "%ProgramFiles(x86)%",

                                   "%ProgramW6432%",

                                   "%TEMP%"

                               ]

                           },

                           "LinuxIndexing": {

                               "guestFSIndexingMode": "indexAllExcept",

                               "indexingList": [

                                   "/cdrom",

                                   "/dev",

                                   "/media",

                                   "/mnt",

                                   "/proc",

                                   "/tmp",

                                   "/lost+found"

                               ]

                           }

                       }

                   ]

               },

               "guestInteractionProxies": {

                   "automaticSelection": true,

                   "proxies": []

               },

               "guestCredentials": {

                   "credentials": {

                       "credentialsName": "tech\\username02",

                       "credentialsTag": "main-domain-credentials"

                   },

                   "credentialsPerMachine": []

               }

           },

           "schedule": {

               "runAutomatically": true,

               "daily": {

                   "dailyKind": "Everyday",

                   "isEnabled": false,

                   "localTime": "10:00 PM",

                   "days": [

                       "sunday",

                       "monday",

                       "tuesday",

                       "wednesday",

                       "thursday",

                       "friday",

                       "saturday"

                   ]

               },

               "monthly": {

                   "dayOfWeek": "saturday",

                   "dayNumberInMonth": "Second",

                   "isEnabled": true,

                   "localTime": "10:00 PM",

                   "dayOfMonth": 1,

                   "months": [

                       "January",

                       "February",

                       "March",

                       "April",

                       "May",

                       "June",

                       "July",

                       "August",

                       "September",

                       "October",

                       "November",

                       "December"

                   ]

               },

               "periodically": {

                   "periodicallyKind": "Hours",

                   "isEnabled": false,

                   "frequency": 24,

                   "backupWindow": {

                       "days": [

                           {

                               "day": "sunday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "monday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "tuesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "wednesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "thursday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "friday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "saturday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           }

                       ]

                   }

               },

               "continuously": {

                   "isEnabled": false,

                   "WindowSetting": {

                       "days": [

                           {

                               "day": "sunday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "monday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "tuesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "wednesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "thursday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "friday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "saturday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           }

                       ]

                   }

               },

               "afterThisJob": {

                   "isEnabled": false,

                   "jobName": null

               },

               "retry": {

                   "isEnabled": true,

                   "retryCount": 3,

                   "awaitMinutes": 10

               },

               "backupWindow": {

                   "isEnabled": false,

                   "WindowSetting": {

                       "days": [

                           {

                               "day": "sunday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "monday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "tuesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "wednesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "thursday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "friday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "saturday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           }

                       ]

                   }

               }

           }

       }

   ]

}

  1. Import backup jobs to backupserver02. In the request body, specify the jobs imported from backupserver01.

Mass DeploymentRequest Example

Request

POST https://backupserver02:9419/api/v1/automation/jobs/import

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Request Body

{

   "jobs": [

       {

           "type": "Backup",

           "name": "Backup Job 2",

           "description": "Created by REST API",

           "isHighPriority": false,

           "virtualMachines": {

               "includes": [

                   {

                       "type": "ResourcePool",

                       "hostName": "vcenter02.tech.local",

                       "name": "likhtarovich",

                       "objectId": "resgroup-32774"

                   }

               ],

               "excludes": {

                   "vms": [],

                   "disks": [

                       {

                           "disksToProcess": "AllDisks",

                           "vmObject": {

                               "type": "ResourcePool",

                               "hostName": "vcenter02.tech.local",

                               "name": "likhtarovich",

                               "objectId": "resgroup-32774"

                           },

                           "disks": [],

                           "removeFromVMConfiguration": true

                       }

                   ],

                   "templates": {

                       "isEnabled": true,

                       "excludeFromIncremental": true

                   }

               }

           },

           "storage": {

               "backupRepository": {

                   "name": "Main Big Repository",

                   "tag": "9FE108322924417FB67582B9004CEF61"

               },

               "backupProxies": {

                   "automaticSelection": true,

                   "proxies": []

               },

               "retentionPolicy": {

                   "type": "RestorePoints",

                   "quantity": 7

               },

               "gfsPolicy": {

                   "isEnabled": false,

                   "weekly": {

                       "desiredTime": "sunday",

                       "isEnabled": false,

                       "keepForNumberOfWeeks": 1

                   },

                   "monthly": {

                       "desiredTime": "First",

                       "isEnabled": false,

                       "keepForNumberOfMonths": 1

                   },

                   "yearly": {

                       "desiredTime": "January",

                       "isEnabled": false,

                       "keepForNumberOfYears": 1

                   }

               },

               "advancedSettings": {

                   "backupModeType": "Incremental",

                   "synthenticFulls": {

                       "isEnabled": true,

                       "days": [

                           "saturday"

                       ]

                   },

                   "activeFulls": {

                       "isEnabled": false,

                       "weekly": {

                           "isEnabled": true,

                           "days": [

                               "saturday"

                           ]

                       },

                       "monthly": {

                           "dayOfWeek": "monday",

                           "dayNumberInMonth": "First",

                           "isEnabled": false,

                           "dayOfMonths": 1,

                           "months": [

                               "January",

                               "February",

                               "March",

                               "April",

                               "May",

                               "June",

                               "July",

                               "August",

                               "September",

                               "October",

                               "November",

                               "December"

                           ]

                       }

                   },

                   "backupHealth": {

                       "isEnabled": true,

                       "weekly": {

                           "isEnabled": false,

                           "days": [

                               "friday"

                           ]

                       },

                       "monthly": {

                           "dayOfWeek": "monday",

                           "dayNumberInMonth": "First",

                           "isEnabled": true,

                           "dayOfMonths": 1,

                           "months": [

                               "March",

                               "July",

                               "November"

                           ]

                       }

                   },

                   "fullBackupMaintenance": {

                       "RemoveData": {

                           "isEnabled": false,

                           "afterDays": 14

                       },

                       "defragmentAndCompact": {

                           "isEnabled": false,

                           "weekly": {

                               "isEnabled": false,

                               "days": [

                                   "saturday"

                               ]

                           },

                           "monthly": {

                               "dayOfWeek": "saturday",

                               "dayNumberInMonth": "Last",

                               "isEnabled": true,

                               "dayOfMonths": 1,

                               "months": [

                                   "January",

                                   "February",

                                   "March",

                                   "April",

                                   "May",

                                   "June",

                                   "July",

                                   "August",

                                   "September",

                                   "October",

                                   "November",

                                   "December"

                               ]

                           }

                       }

                   },

                   "storageData": {

                       "compressionLevel": "Optimal",

                       "storageOptimization": "LocalTarget",

                       "enableInlineDataDedup": true,

                       "excludeSwapFileBlocks": true,

                       "excludeDeletedFileBlocks": true,

                       "encryption": {

                           "isEnabled": false,

                           "encryptionPasswordIdOrNull": "00000000-0000-0000-0000-000000000000",

                           "encryptionPasswordTag": null

                       }

                   },

                   "notifications": {

                       "sendSNMPNotifications": false,

                       "emailNotifications": {

                           "notificationType": null,

                           "isEnabled": false,

                           "recipients": [],

                           "customNotificationSettings": null

                       },

                       "vmAttribute": {

                           "isEnabled": false,

                           "notes": "Notes",

                           "appendToExisitingValue": true

                       }

                   },

                   "vSphere": {

                       "enableVMWareToolsQuiescence": false,

                       "changedBlockTracking": {

                           "isEnabled": true,

                           "enableCBTautomatically": true,

                           "resetCBTonActiveFull": true

                       }

                   },

                   "storageIntegration": {

                       "isEnabled": true,

                       "limitProcessedVm": false,

                       "limitProcessedVmCount": 10,

                       "failoverToStandardBackup": false

                   },

                   "scripts": {

                       "periodicityType": "BackupSessions",

                       "preCommand": {

                           "isEnabled": false,

                           "command": ""

                       },

                       "postCommand": {

                           "isEnabled": false,

                           "command": ""

                       },

                       "runScriptEvery": 1,

                       "dayOfWeek": [

                           "saturday"

                       ]

                   }

               }

           },

           "guestProcessing": {

               "applicationAwareProcessing": {

                   "isEnabled": false,

                   "appSettings": []

               },

               "guestFileSystemIndexing": {

                   "isEnabled": true,

                   "indexingSettings": [

                       {

                           "vmObject": {

                               "type": "ResourcePool",

                               "hostName": "vcenter02.tech.local",

                               "name": "likhtarovich",

                               "objectId": "resgroup-32774"

                           },

                           "WindowsIndexing": {

                               "guestFSIndexingMode": "indexAllExcept",

                               "indexingList": [

                                   "%windir%",

                                   "%ProgramFiles%",

                                   "%ProgramFiles(x86)%",

                                   "%ProgramW6432%",

                                   "%TEMP%"

                               ]

                           },

                           "LinuxIndexing": {

                               "guestFSIndexingMode": "indexAllExcept",

                               "indexingList": [

                                   "/cdrom",

                                   "/dev",

                                   "/media",

                                   "/mnt",

                                   "/proc",

                                   "/tmp",

                                   "/lost+found"

                               ]

                           }

                       }

                   ]

               },

               "guestInteractionProxies": {

                   "automaticSelection": true,

                   "proxies": []

               },

               "guestCredentials": {

                   "credentials": {

                       "credentialsName": "tech\\username02",

                       "credentialsTag": "main-domain-credentials"

                   },

                   "credentialsPerMachine": []

               }

           },

           "schedule": {

               "runAutomatically": true,

               "daily": {

                   "dailyKind": "Everyday",

                   "isEnabled": false,

                   "localTime": "10:00 PM",

                   "days": [

                       "sunday",

                       "monday",

                       "tuesday",

                       "wednesday",

                       "thursday",

                       "friday",

                       "saturday"

                   ]

               },

               "monthly": {

                   "dayOfWeek": "saturday",

                   "dayNumberInMonth": "Second",

                   "isEnabled": true,

                   "localTime": "10:00 PM",

                   "dayOfMonth": 1,

                   "months": [

                       "January",

                       "February",

                       "March",

                       "April",

                       "May",

                       "June",

                       "July",

                       "August",

                       "September",

                       "October",

                       "November",

                       "December"

                   ]

               },

               "periodically": {

                   "periodicallyKind": "Hours",

                   "isEnabled": false,

                   "frequency": 24,

                   "backupWindow": {

                       "days": [

                           {

                               "day": "sunday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "monday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "tuesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "wednesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "thursday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "friday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "saturday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           }

                       ]

                   }

               },

               "continuously": {

                   "isEnabled": false,

                   "WindowSetting": {

                       "days": [

                           {

                               "day": "sunday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "monday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "tuesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "wednesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "thursday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "friday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "saturday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           }

                       ]

                   }

               },

               "afterThisJob": {

                   "isEnabled": false,

                   "jobName": null

               },

               "retry": {

                   "isEnabled": true,

                   "retryCount": 3,

                   "awaitMinutes": 10

               },

               "backupWindow": {

                   "isEnabled": false,

                   "WindowSetting": {

                       "days": [

                           {

                               "day": "sunday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "monday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "tuesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "wednesday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "thursday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "friday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           },

                           {

                               "day": "saturday",

                               "hours": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"

                           }

                       ]

                   }

               }

           }

       }

   ]

}

In response you receive an automation session. Within the session, the specified backup jobs are created on backupserver02. For more information on tracking the session state, see Tracking Import Operation.