This topic describes how to migrate data from a public instance of the previous version to an Enterprise Edition instance. The procedure includes creating a migration task, performing phased migration, and then performing full migration.
Prerequisites
You are familiar with the overall process and precautions for migrating data between instances. For more information, see Instance migration process.
Business evaluation and system reconfiguration are complete. For more information, see Preparations before migration.
Step 1: Create a migration task
You can create a migration task for a specific product in a public instance. The initial status of the migration task is To be Migrated, which indicates that the migration is not started and does not affect your business.
Log on to the IoT Platform console.
In the upper-left corner, select the region where IoT Platform is activated. On the Overview tab, click Public Instance.
ImportantYou can migrate data only from a public instance of the previous version to a Standard Enterprise Edition instance. For more information, see Overview of IoT Platform instances.
In the left-side navigation pane, choose . On the Migration Tasks tab, click Create Migration Task.
In the dialog box that appears, select an ID from the Target instance ID drop-down list, select a product of the public instance from the Products drop-down list, and then click OK.
The created instance is in the To be Migrated state, which indicates that the migration is not started.
Optional: View the details of the migration task: On the Migration Details page, view information about the migration task.
Optional: Enable data synchronization: By default, the data synchronization feature for Thing Specification Language (TSL) models is disabled. To ensure business continuity during the migration, you can enable data synchronization immediately after you create a migration task.
NoteIf you do not need to synchronize device data, skip this step.
Step 2: Perform phased migration
You can perform phased migration on some devices, and then evaluate the migration result. You can start full migration for all data of a specific product only after you make sure that the migration task does not affect your business.
We recommend that you create devices for phased migration. The devices belong to the product whose data you want to migrate.
If Advanced Message Queuing Protocol (AMQP) server-side subscriptions are configured or data is forwarded to an AMQP consumer group, copy the new consumer group ID and connect a new AMQP client to IoT Platform by using the SDK to receive data after phased migration.
Start phased migration
On the Migration Tasks tab, find the task that is in the To be Migrated state and click Start Migration in the Actions column.
In the Start Migration Task dialog box, set the Device Selection Method parameter to one of the following options, and then select the devices on which you want to perform phased migration.
Select
ImportantIf you use this device selection method, you can select up to 100 devices for phased migration.
Click the Canary Device drop-down list. In the Select a device panel that appears on the right side, select the devices.
Click OK.
Upload File
ImportantIf you use this device selection method, you can select up to 10,000 devices for phased migration.
Click Download Template to download the device information template, enter the names of the devices on which you want to perform phased migration in the DeviceNames column, and then save the table.
Click Upload File below the Canary Devices parameter to upload the saved table in the IoT Platform console.
Make sure that all preparations are complete, select the check boxes, and then click Start Now.
Phased migration in progress
On the Migration Tasks tab, the migration task is in the Canary Release Completed state.
You can only view the migration details. You can click View in the Actions column. On the Migration Details page, view information about the task. For more information, see Optional: View the details of the migration task.
Canary release completed
When the migration task enters the Canary Release Completed state, the specified devices are migrated. You can start full migration for the product data. You can also roll back the migration task based on your business requirements. For more information, see the following sections:
Step 3: Perform full migration
After you complete phased migration, you can start full migration of all device data that belongs to a product.
Make sure that the system is transformed and released. For example, the ID of the Enterprise Edition instance must be specified as the value of a request parameter of an IoT Platform API operation that you want to call and the consumer group ID of the SDK that is used to connect the AMQP client is updated. For more information, see Preparations before migration.
Start full migration
On the Migration Tasks tab, find the migration task that is in the Canary Release Completed state and click Start Migration in the Actions column.
In the Start Migration Task dialog box, click Full Migration, confirm that all required operations are complete before the migration, select the corresponding check boxes, and then click Start Now.
Full migration in progress
On the Migration Tasks tab, the migration task is in the Migrating state.
You can pause or roll back the migration task. You can also view the migration details. For more information, see the following sections:
Migration completed
When the migration task enters the Migration Completed state, all devices of the specified product are migrated from the public instance to the Enterprise Edition instance. If the data that is submitted by the device is also migrated, you can disable the data synchronization feature. For more information, see Optional: Disable data synchronization.
Optional: Roll back the migration task
You cannot roll back migration tasks that are in the Canary Release in Progress state.
Before you roll back a migration task, make sure that the products whose data you want to migrate are retained in the public instance. If the product is deleted, an error is returned.
The rollback operation does not delete the migrated server-side subscriptions and data of the rules engine from the destination Enterprise Edition instance.
Start the migration rollback
You can roll back a migration task based on your business requirements. The migration task can be in one of the following states: Canary Release Completed, Migrating, Pause Migration, Continue Migration, or Migration Completed.
To roll back a migration task, find the migration task on the Migration Tasks tab and click Roll Back in the Actions column.
In the Start Rollback Task dialog box, select a rollback type to roll back the migration task for devices.
Roll back the migration task for specific devices
Choose one of the following options to select the devices for which you want to roll back the migration task, and then click Start Now.
ImportantYou can select up to 10,000 devices to roll back the migration task.
Select
Click the Rollback Device drop-down list. In the Select a device panel that appears on the right side, select the devices for which you want to roll back the migration task.
Click OK.
Upload File
Click Download Template to download the device information template, enter the names of devices for which you want to roll back the migration task in the DeviceNames column, and then save the table.
Click Upload File below the Rollback Devices parameter to upload the saved table in the IoT Platform console.
Roll back the migration task for all devices
Click Start Now.
Rollback in progress
After you roll back a migration task in the Canary Release Completed, Migrating, Pause Migration, or Continue Migration state, the migration task enters the Rolling Back state. You can pause migration tasks in the Rolling Back state. For more information, see Optional: Pause the migration task.
After you roll back a migration task in the Migration Completed state, the migration task enters the Batch Rollback state. You cannot pause migration tasks in the Batch Rollback state.
Rollback completed
After the rollback operation is complete, all the migrated device data becomes invalid and the migration task enters the To be Migrated state.
If the rollback operation is successful, you can perform the following operations to restart the migration task:
If the destination instance remains unchanged, you can restart the migration task by performing Step 2: Perform the phased migration and Step 3: Perform the full migration.
If the destination instance changes, you can create a migration task by performing Step 1: Create a migration task, Step 2: Perform the phased migration, and Step 3: Perform the full migration.
Optional: Pause the migration task
You can pause a migration task based on your business requirements. The migration task can be in the Migrating or Rolling Back state. To pause a migration task, find the migration task on the Migration Tasks tab, click Pause in the Actions column, and then click OK.
The following table describes the possible results.
Task status before the operation | Result |
Migrating | The migration task enters the Pause Migration state, and the device data of the specified product stops being migrated to the destination instance. You can click Continue Migration to resume the full migration task. |
Rolling Back | The migration task enters the Pause Rollback state. You can click Continue Rollback to resume the rollback operation. |
Optional: View the details of the migration task
On the Migration Tasks tab, find the migration task that you want to manage and click View in the Actions column.
On the Migration Details page, view information about the task, including the ProductKey of the specified product, migration status, total number of devices to be migrated, destination instance ID, creation time of the migration task, start time of data synchronization, and details of all devices to be migrated.
You can specify the status of the migration task, such as Not Migrated, Migrated, or Migration Failed. You can also enter a device name to search for specific devices and view information about the migration task.
If the device migration task fails, contact Alibaba Cloud for technical support.
Optional: Go to the Instance Migration page and click the Migration Monitoring tab to view the real-time monitoring data of migration tasks. For more information, see View migration metrics.
Optional: Enable data synchronization
By default, the data synchronization feature for TSL models is disabled. After you create a migration task, you can enable this feature to ensure business continuity.
On the Migration Tasks tab, find the migration task that you want to manage and click View in the Actions column.
In the upper-right corner of the Migration Details page, click Enable Data Synchronization.
After you enable the data synchronization feature, the new data that is submitted by the devices of the specified product in the public instance is synchronized to the Enterprise Edition instance. The start time of the data synchronization operation is up to 1 minute later than the time when the feature is enabled.
On the Migration Details page, you can view the start time of data synchronization next to Synchronized At and the migration status next to Status.
Optional: Disable data synchronization
IoT Platform automatically disables data synchronization 30 days after you enable data synchronization. You can also perform the following steps to disable data synchronization:
Before you disable data synchronization, make sure that the migration task is complete to prevent impacts on your business.
On the Migration Tasks tab, find the migration task that you want to manage and click View in the Actions column.
In the upper-right corner of the Migration Details page, click Failed to disable data synchronization.
ImportantAfter you disable data synchronization, you cannot re-enable data synchronization for a complete migration task. If the migration task is in progress, you can re-enable data synchronization.
Result
If the migration task for a specific product enters the Migration Completed state, the data of the product is migrated to the destination instance.