Resuming the Migration

You can resume the migration of subscriptions that were not migrated for different reasons after the initial run of the script. Here are examples of situations in which you need to resume the migration:

  • The migration of a subscription was not completed due to orders that were not processed within their order completion timeout intervals.

  • The migration of a subscription was not completed due to failed orders, and the reasons that caused those failures are now fixed.

We recommend that you resume the migration by following these steps:

  1. Run the script in dry-run execution mode. (No migration is actually performed in this execution mode.)

  2. Check the report and log files produced by the script. If there are any issues, analyze and fix them before running the script in production mode.

  3. Run the script in production execution mode.

  4. Check the report and log files produced by the script. If there are any issues, analyze and fix them.

  5. In BSS, check the orders created by the script. If there are any issues, analyze and fix them.

    Important: (for New Subscription Mode) After you fix those issues and the failed orders are processed, you must cancel the appropriate source subscriptions. You can do that manually or by re-running the script as described in this section.

Note: The script automatically determines the migration mode (New Subscription Mode or Switch Plan Mode) that was used for the migration based on the data from the file specified in the --source-data script parameter. It then resumes the migration using the determined migration mode.

Parameters

The parameters of the script that you can use when resuming the migration are in the tables.

Parameter name Mandatory Description
--source-data Yes

The path to the CSV file with the total migration results that was generated during the previous run of the script.

For example: outresult/m365_<TIMESTAMP>/total_migration_results.csv

Important: In this parameter you must specify the path to total_migration_results.csv that was generated after executing the ... connect_migration.py migration ... command. Also, you can specify the path to total_migration_results.csv that was generated after executing the ... connect_migration.py resume-migration ... command.

--dry-run No

When specified, the script is run in dry-run execution mode. In this mode, the script performs checks and stores the results in report and log files. No actual actions are performed.

Important: We recommend that you first run the script in dry-run execution mode and check the report and log files produced by the script.

--threads No

The number of threads to be created for performing the collection and validation of migration data (from 0 to 16).

If not specified or specified with the 0 value, the script automatically determines how many threads it needs to create based on the number of CPU cores in your system.

--threads-l2 No

The number of threads to be created for migrating the source subscriptions of a customer account (from 0 to 4). If not specified, up to 2 threads are created per customer account being processed.

If specified with the 0 value, the script automatically determines how many threads it needs to create based on the number of CPU cores in your system.

For example, if your typical customer account has 3 source subscriptions, set this parameter to 3.

--threads-l3 No

The number of threads to be created for processing customer accounts with source subscriptions (from 0 to 32). If not specified, up to 8 threads are created.

If specified with the 0 value, the script automatically determines how many threads it needs to create based on the number of CPU cores in your system.

--timeout-order-process No

Orders processing consists of two phases:

  • Phase 1: The migration script creates all necessary orders for Microsoft 365 CSP subscriptions. After those orders are created, the second phase begins.

  • Phase 2: The migration script periodically checks the orders created during the first phase. It waits 600 seconds (the default timeout interval for order completion) for each order to either successfully complete or fail. When all orders created for a Microsoft 365 subscription complete, each within its own timeout interval, that subscription is considered migrated.

    Note: For New Subscription Mode, the script also creates cancellation orders for Microsoft 365 CSP subscriptions whose sales orders successfully completed. Those cancellation orders are processed in the same way as orders created during the first phase.

With this parameter, you can redefine the default timeout interval for order completion of 600 seconds (from 60 to 86400).

Note: In the first phase, the majority of operations is performed within your CloudBlue Commerce installation. In the second phase, the majority of operations is performed on the CloudBlue Connect and Microsoft sides.

Important: If an order created for a Microsoft 365 CSP subscription does not complete successfully during order processing, you must complete the migration of that Microsoft 365 CSP subscription. You can do that manually or by re-running the script as described in this section.

--sourcemodel Yes

The type of the application or extension whose subscriptions you need to migrate. You must specify one of these values, depending on which application or extension is installed:

  • odin (for the Microsoft 365 application)

  • softcom (for the O365_APS2 application)

  • csp-extension (for CSP Connect Extension)

--connect-products Yes The path to a JSON configuration file that contains CloudBlue Connect product descriptions. You must specify the path to the file that you prepared in Preparing a JSON Configuration File with Target Product Descriptions. For example: connect_product_descriptions.json
--verbose No When specified, the script writes more details to its log files.
--out-root-path No

The root directory for log and report files produced by the script.

By default, the script uses the directory where it is placed as the root directory.

Note: If the root directory that you specified does not exist, the script will create it.

--om-workload No Defines the maximum number of requests to the Order Management component's API that the migration script can perform simultaneously (from 1 to 16). By default, this parameter is set to 4.
--oa-api-user No The username of a user for connecting to the OSS and BSS XML-RPC APIs. You must specify it if HTTP authentication is turned on for the APIs.
--oa-api-user-password No The password of a user for connecting to the OSS and BSS XML-RPC APIs. You must specify it if HTTP authentication is turned on for the APIs.
-h No When specified, the script prints its parameters and their short description.

How To Run the Script

To run the script, go to the respective directory on your server and execute this command:

python connect_migration.py resume-migration [OTHER PARAMETERS]

Important: In the --source-data parameter you must specify the path to total_migration_results.csv that was generated after executing the ... connect_migration.py migration ... command. Also, you can specify the path to total_migration_results.csv that was generated after executing the ... connect_migration.py resume-migration ... command.

Note: You can resume the migration of subscriptions as many times as you need.

Here are some examples of various scenarios:

  • Run the script in dry-run execution mode for the Microsoft 365 application:

    python connect_migration.py resume-migration --dry-run --source-data outresult/m365_<TIMESTAMP>/total_migration_results.csv --sourcemodel odin --connect-products connect_product_descriptions.json
  • Run the script in production execution mode for the Microsoft 365 application:

    python connect_migration.py resume-migration --source-data outresult/m365_<TIMESTAMP>/total_migration_results.csv --sourcemodel odin --connect-products connect_product_descriptions.json
  • Run the script in dry-run execution mode for the O365_APS2 application:

    python connect_migration.py resume-migration --dry-run --source-data outresult/m365_<TIMESTAMP>/total_migration_results.csv --sourcemodel softcom --connect-products connect_product_descriptions.json
  • Run the script in production execution mode for the O365_APS2 application:

    python connect_migration.py resume-migration --source-data outresult/m365_<TIMESTAMP>/total_migration_results.csv --sourcemodel softcom --connect-products connect_product_descriptions.json
  • Run the script in dry-run execution mode for CSP Connect Extension:

    python connect_migration.py resume-migration --dry-run --source-data outresult/m365_<TIMESTAMP>/total_migration_results.csv --sourcemodel csp-extension --connect-products connect_product_descriptions.json
  • Run the script in production execution mode for CSP Connect Extension:

    python connect_migration.py resume-migration --source-data outresult/m365_<TIMESTAMP>/total_migration_results.csv --sourcemodel csp-extension --connect-products connect_product_descriptions.json

Script Output

After each run, the script outputs migration statistics and the location of its log and report files to your console. For example:

...
Report for subscription #1000122    : ............................. outresult/resume_20220413T134952/subscriptions/subs_C1000048_1000122.csv

Errors data to file                 : .......................................................... outresult/resume_20220413T134952/errors.csv
Warnings data to file               : ........................................................ outresult/resume_20220413T134952/warnings.csv
Results migrated subscriptions      : ................................................. outresult/resume_20220413T134952/migrate_results.csv
Failed migrated subscriptions       : ............................................ outresult/resume_20220413T134952/fail_migrate_results.csv
Successful migrated subscriptions   : ......................................... outresult/resume_20220413T134952/success_migrate_results.csv
Total results migrated subscriptions: ......................................... outresult/resume_20220413T134952/total_migration_results.csv

Log file name                       : ........................................................................... migration_2022-04-13.log

##############################################################
### dry-run mode                                           ###
##############################################################

Statistics:
---------------------------------------------------------------
preparation phase
---------------------------------------------------------------
connect products (configured and available) ................ 1
customers total ............................................ 5
customers ready for migration .............................. 0
customers with errors ...................................... 5
customers with warnings .................................... 3
subscriptions total ........................................ 10
subscriptions prepared for migration  ...................... 0
subscriptions with errors .................................. 10
subscriptions with warnings ................................ 0
---------------------------------------------------------------
migration phase
---------------------------------------------------------------
customers migrated to connect .............................. dry-run mode
subscriptions migrated to connect .......................... dry-run mode
subscriptions with migration errors ........................ dry-run mode
---------------------------------------------------------------

Done.
...

Log and Report Files

  • The script writes log records to files named migration_<YYYY-MM-DD>.log. Log records are appended to the same log file for each day.

  • After each run, the script generates these reports:

    • outresult/resume_<TIMESTAMP>/load_input_data_warning.csv contains warnings that appear when input data is loaded.

      Note: This report is not created if input data is loaded without warnings.

    • outresult/resume_<TIMESTAMP>/subscriptions/subs_C<CUSTOMER_ACCOUNT_ID>_<SOURCE_SUBSCRIPTION_ID>.csv contains detailed information about a subscription of a customer account.

    • outresult/resume_<TIMESTAMP>/errors.csv contains information about subscriptions whose processing completed with errors.

    • outresult/resume_<TIMESTAMP>/warnings.csv contains information about subscriptions whose processing completed with warnings.

    • outresult/resume_<TIMESTAMP>/migrate_results.csv contains information about all subscriptions.

    • outresult/resume_<TIMESTAMP>/fail_migrate_results.csv contains information about failed subscriptions.

    • outresult/resume_<TIMESTAMP>/success_migrate_results.csv contains information about successfully migrated subscriptions.

    • outresult/resume_<TIMESTAMP>/total_migration_results.csv contains total migration results.

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.