67942: Acronis Cyber Protect Cloud: Mass edition switch for multiple customers

use Google Translate

Last update: 27-08-2021

If you use a PSA integration such as ConnectWise Manage or Autotask PSA, you should not use this script. Any changes made by this script are reversed by the PSA integration on the next sync. Please see Mass edition switch for multiple customers using ConnectWise Manage or PSA integrations instead

This script allows switching edition to multiple customers

Script

Download the script and unpack it.

Requirements

  • Parent of the target tenant or the target tenant itself must have offering items from the target edition enabled, otherwise the offering items will be disabled
  • Python version required: 3.6 or newer
  • “Requests” is required (pip install requests)
  • Create an API client

Recommendations for partners with multiple subtenants

1. The script cannot work with tenants that have Support access disabled.

2. We do not recommend using the script for 1000+ tenants switch simultaneously. In this case it is preferable to:

  1. Either re-organize by folders (in 1000 customers max in each folder) and switch folder by folder.
  2. Automate execution of the script customer by customer.

Usage

mass_edition_switch.py [-h] [--dry-run] --dc-address <DC_ADDRESS> --client-id <CLIENT_ID> --client-secret <CLIENT_SECRET> --target-edition <{standard, advanced, disaster_recovery, cyber_protect_std, cyber_protect_adv, cyber_protect_dre, per_workload, per_gigabyte}> --target-tenant-id <TARGET_TENANT_ID> [--yes] [--log-level {debug,info}] [--log-file-folder LOG_FILE_FOLDER] [--fail-on-first-issue]

To provide a key for the proper target edition, use the following mapping for reference:

Cyber Protection

Edition  --target-edition
Legacy
editions
Cyber Backup - Standard standard
Cyber Backup - Advanced advanced
Cyber Backup - Disaster Recovery disaster_recovery
Cyber Protect - Standard cyber_protect_std
Cyber Protect - Advanced cyber_protect_adv
Cyber Protect - Disaster Recovery cyber_protect_dre
Cyber Backup (per gigabyte) per_gigabyte
Cyber Protect (per workload) per_workload
C21.03
editions
Per gigabyte pck_per_gigabyte
Per workload pck_per_workload

File Sync & Share 

Edition --target-edition
Legacy
editions
Inherited from partner contract fss_legacy
C21.03
editions
Per gigabyte fss_per_gigabyte
Per user fss_per_user

Optional arguments

-h, --help Show this help message and exit
--dry-run Run script in test mode to check whether all selected customers can be switched to the target edition without actually changing anything
--dc-address <DC_ADDRESS> Your DC address. Example: `https://us-cloud.acronis.com`
--client-id <CLIENT_ID> Your API client ID.
--client-secret CLIENT_SECRET Your API client secret.
--target-edition <{standard,advanced,disaster_recovery,cyber_protect_std,cyber_protect_adv,cyber_protect_dre,per_workload,per_gigabyte}> Target edition key
--target-tenant-id <TARGET_TENANT_ID> Target tenant ID (uid). If you provide your partner-level ID, the edition will be switched for all child tenants though the hierarchy, including child tenants of sub-partners. If you provide a folder ID or a customer ID, the edition will be switched for this folder or customer.
--yes Perform actions without approve
--log-level {debug,info} Set the logging level
--log-file-folder <LOG_FILE_FOLDER> Path to log folder
--fail-on-first-issue Stop script execution if any issues occur. If not specified, the script continues its work and writes errors to the log.

Examples

Fail if issue found

$ python3 mass_edition_switch.py --client-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --client-secret xxxxxxxxxxxxxxxxx --target-tenant-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --dc-address https://us-cloud.acronis.com --target-edition per_gigabyte --yes --fail-on-first-issue
[2020-09-28 14:08:16,844] comp_1 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) - edition switch not possible. Please turn on all possible offering items on a target tenant and try again. It is also possible to run the script with `--log-level debug` option to get more detailed information on the issue

Fail if issue found (extended logs)

$ python3 mass_edition_switch.py --client-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --client-secret xxxxxxxxxxxxxxxxx --target-tenant-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --dc-address https://us-cloud.acronis.com --target-edition per_gigabyte --yes --fail-on-first-issue --log-level debug
...
[2020-09-28 14:10:41,536] comp_1 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) - Cannot switch edition. Following offering items cannot be turned on in the target edition: [{'name': 'mx_p_ess_workstations'}, {'name': 'mx_storage', 'infra_id': xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’}, {'name': 'mx_p_workstations'}, {'name': 'mx_p_ess_servers'}]
[2020-09-28 14:10:41,536] comp_1 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) - edition switch not possible. Please turn on all possible offering items on a target tenant and try again

Interactive mode

$ python3 mass_edition_switch.py --client-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --client-secret xxxxxxxxxxxxxxxxx --target-tenant-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --dc-address https://us-cloud.acronis.com --target-edition advanced