Migrate data from a legacy public instance to a target Enterprise Edition instance by creating a migration task, performing a phased migration, and running a full migration.
Prerequisites
-
Understand the overall process and considerations for instance migration. For more information, see Overall migration flow.
-
Complete the business assessment and system modifications. For more information, see Preparations before migration.
Step 1: Create a migration task
Create a migration task for a specific product in your public instance. The initial status of the task is To be Migrated, indicating the migration has not started and will not affect your services.
-
Log on to the IoT Platform console.
-
In the upper-left corner of the console, select the region where IoT Platform is activated. On the Instance Overview tab, click Public Instance.
ImportantThe instance migration feature supports only data migration from a legacy public instance to a Standard Enterprise instance. For more information about instances, see Instance overview.
-
In the navigation pane on the left, choose . On the Migration List tab, click Create Migration Task.
-
In the dialog box, select the Target Instance ID and the Product from the public instance to migrate, and then click OK.
Creating a migration task does not start the migration. Before you proceed, make sure the target instance has enough device quota for the selected product and review the migration documentation.
After a migration task is created, its status is To be Migrated, which indicates that the migration has not started.
-
Optional: View migration details: On the Migration Details page, view information about the migration task.
-
Optional: Enable data synchronization: Data synchronization for device TSL model is disabled by default. You can enable it immediately after creating a migration task to prevent service interruptions during the migration.
NoteIf your business does not require device data synchronization, you can skip this step.
Step 2: Phased migration
Perform a phased migration with a small batch of devices first. Monitor the process to verify that your services are not affected before you start a full migration.
-
We recommend that you create new devices under the product for the phased migration.
-
If you have configured an AMQP server-side subscription or message forwarding to AMQP, you must copy the updated consumer group ID and restart the AMQP client SDK to receive data after the phased migration completes.
Start the phased migration
-
On the Migration List tab, find the task with a status of To be Migrated and click Start Migration in the Actions column.
-
In the Start Migration Task dialog box, select a method to specify the devices for the phased migration.
ImportantThe number of devices to be migrated cannot exceed the remaining device quota of the target instance. Otherwise, the system displays the error message:
The total number of devices in the target instance exceeds the maximum limit.Manual selection
ImportantYou can select up to 100 devices per phased migration task using this method.
-
Click the canary devices drop-down list, and in the device panel that appears on the right, select the checkboxes next to the desired devices.
-
Click OK.
Upload file
ImportantYou can add up to 10,000 devices per phased migration task using this method.
-
Click Download Template. In the downloaded file, enter the device names in the DeviceNames column, and then save the file.
-
Click Upload File to upload the saved file to the IoT Platform console.
-
-
Confirm that you have completed all pre-migration operations, select the corresponding checkboxes, and then click Start Now.
The three checkboxes are I have read the migration documentation, Server-side modifications are complete, and I have verified the process with test devices.
Canary release in progress
On the Migration List tab, the status of the migration task changes to Canary release in progress.
During this stage, you can only view the migration details. Click View in the Actions column to open the Migration Details page and view task information. For more information, see Optional: View migration details.
Canary release completed
When the migration task enters the Canary Release Completed state, the specified devices have been migrated. You can proceed with a full migration or roll back the migration if necessary. For more information, see the following topics:
Step 3: Full migration
After the phased migration is complete, start the full migration for the specified product.
Make sure that the system refactoring is complete and published. For example, cloud API calls must include the Enterprise instance ID, and the consumer group ID in the AMQP client SDK must be updated. For more information, see Preparations before migration.
Start the full migration
-
On the Migration List tab, find the task with a status of Canary Release Completed and click Start Migration in the Actions column.
-
In the Start Migration Task dialog box, click Full Migration. Confirm that you have completed all pre-migration operations, select the corresponding checkboxes, and then click Start Now.
ImportantThe number of devices to be migrated cannot exceed the remaining device quota of the target instance. Otherwise, the system displays the error message:
The total number of devices in the target instance exceeds the maximum limit.The three checkboxes are I have read the migration documentation, Server-side modifications are complete, and I have verified the process with test devices.
Migrating
On the Migration List tab, the status of the migration task changes to Migrating.
During this stage, you can view details, pause the task, or roll it back:
Migration completed
When the migration task status changes to Migration Completed, the specified product and its devices have been migrated from the public instance. If the migration of device-reported data is also complete, you can manually disable data synchronization. For details, see Optional: Disable data synchronization.
Optional: Roll back a migration task
-
You cannot roll back a task that is in the Canary release in progress state.
-
Before you initiate a rollback, ensure that the corresponding product has not been deleted from the public instance. If the product has been deleted, the rollback will fail.
-
A rollback does not delete the migrated server-side subscription and rules engine data from the target Enterprise Edition instance.
Start rollback
You can, based on your business requirements, roll back migration tasks in the Canary Release Completed, Migrating, Pause Migration, Continue Migration, or Migration Completed state:
-
On the Migration List tab, click Rollback in the Actions column for the migration task.
-
In the Start Rollback Task dialog box, select a rollback type to revert the device migration.
Specific devices
Choose one of the following methods to select the devices to roll back, and then click Start Now.
ImportantYou can select up to 10,000 devices per rollback task using this method.
Manual selection
-
Click the rollback devices drop-down list, and in the device panel that appears on the right, select the checkboxes next to the desired devices.
-
Click OK.
In the Start Rollback Task dialog box, set Rollback Type to Specific Devices and Device Selection Method to Manual Selection. After selecting the devices, click Start Now.
Upload file
-
Click Download Template. In the downloaded file, enter the device names in the DeviceNames column, and then save the file.
-
Click Upload File to upload the saved file to the IoT Platform console.
In the Start Rollback Task dialog box, set Rollback Type to Specific Devices and Device Selection Method to Upload File, and then click Start Now.
-
Rolling back
-
For tasks in the Canary Release Completed, Migrating, Pause Migration, or Continue Migration state, initiating a rollback changes their status to Rolling Back. You can pause a task in this state. For more information, see Optional: Pause a migration task.
-
For a task in the Migration Completed state, initiating a rollback changes its status to Batch Rollback. You cannot pause a task in this state.
Rollback completed
After the rollback is complete, all migrated device data for the task is invalidated and the migration task status reverts to To be Migrated.
After a successful rollback, if you need to migrate the product data again:
-
If the target instance remains the same, follow the procedures in Step 2: Perform a phased migration and Step 3: Perform a full migration.
-
If the target instance changes, follow the procedures in Step 1: Create a migration task, Step 2: Perform a phased migration, and Step 3: Perform a full migration.
Optional: Pause a migration task
You can pause a migration task that is in the Migrating or Rolling Back state. On the Migration List tab, click Pause in the Actions column of the migration task, and then click Confirm.
The outcome of this operation depends on the previous task status:
|
Previous status |
Result |
|
Migrating |
The task status changes to Pause Migration, and data for the product stops migrating to the target instance. You can click Continue Migration to resume the full migration task. |
|
Rolling Back |
The task status changes to Pause Rollback. You can click Continue Rollback to complete the rollback of the migration task. |
Click Start Now.
In the Start Rollback Task dialog box, set Rollback Type to Specific Devices or All Devices. A full rollback reverts all migrated devices in the task to the public instance.
Optional: View migration details
-
On the Migration List tab, click View in the Actions column for the migration task.
-
On the Migration Details page, view task information, including the ProductKey, migration status, total number of devices, target instance ID, creation time, data synchronization start time, and the list of devices selected for migration.
You can filter devices by migration status (Not Migrated, Migrated, or Migration Failed) or search for a specific device to check its migration progress.
If a device fails to migrate, .
The top of the Migration Details page shows the task status as Canary release in progress.
-
Optional: Return to the Instance Migration page and click Migration Monitoring to view real-time statistics for migration data metrics. For more information, see View migration data metrics.
Migration monitoring metrics include Online Device Count and Message Volume Sent to Platform. You can use the Time drop-down list to filter the statistics by time range.
Optional: Enable data synchronization
Data synchronization for device TSL model is disabled by default. You can enable it after creating a migration task to prevent service interruptions during the migration.
-
On the Migration List tab, click View in the Actions column for the migration task.
-
In the upper-right corner of the Migration Details page, click Enable Data Synchronization.
At this point, the page shows "-" for both Data Migration Status and Data Synchronization Start Time, which indicates that data synchronization is not enabled.
After data synchronization is enabled, data reported by devices of the specified product in the public instance is synchronized to the target Enterprise Edition instance. Synchronization starts within one minute after you enable it.
On the Migration Details page, you can view the specific Data Synchronization Start Time and Data Migration Status.
Optional: Disable data synchronization
The system automatically disables data synchronization 30 days after it is enabled. You can also disable it manually:
Before you disable data synchronization, make sure the instance migration is complete to avoid service interruptions.
-
On the Migration List tab, click View in the Actions column for the migration task.
-
In the upper-right corner of the Migration Details page, click Disable Data Synchronization.
ImportantAfter you manually disable data synchronization, you cannot re-enable it if the migration task is complete. If the task is not complete, you can re-enable data synchronization.
Results
When the task status changes to Migration Completed, the product data has been migrated to the target instance.