All Products
Search
Document Center

IoT Platform:Best practices for instance migration

Last Updated:Jun 16, 2026

IoT Platform allows you to migrate products, devices, and rules engine data from a legacy public instance to an Enterprise Edition instance. This example uses a shared-service enterprise to illustrate the required business system modifications and the migration solution.

Background information

Enterprise A runs a shared-service platform on IoT Platform, providing shared washing machines, dryers, and massage chairs across smart parks and smart campuses.

Compared with legacy public instances, Enterprise Edition instances offer more features, better scalability, higher stability, and more flexible business models. For more information, see Differences between public instances and Enterprise Edition instances.

To meet customer-specific project requirements, select a suitable Enterprise Edition instance type. This enables resource isolation, platform stability, and lower evaluation costs. For more information, see Types of Enterprise Edition instances.

Because existing devices run on legacy public instances, you can migrate device data to an Enterprise Edition instance for resource isolation, improved stability, and lower costs.

Scenarios

Scenario

Sequence number

Description

1~1.2

Connect shared devices to IoT Platform and submit device data.

Your application uses AMQP server-side subscriptions or data forwarding to receive device data, such as device status.

Your databases store the forwarded device data or subscribed device data in real time.

2~2.2

A customer scans a QR code on the shared-service platform app to complete authentication and authorization, views the device status, and sends commands to the shared device to use shared services.

Note

After successful authentication, the app connects to the shared-service platform and starts billing.

Your application receives commands from the customer and invokes IoT Platform device management services to start shared services on the device.

While the device is running or after shared services complete, the device submits its status to IoT Platform. IoT Platform forwards the status data to your application through data forwarding, and your application stores it in the database. When shared services complete, the platform sends a push notification to the app with completion and billing details.

Migration solution

For the instance migration process, see Usage notes. Evaluate the business system related to shared devices and create a migration solution based on that process.

Modify the business system

After evaluating the business system, modify the following items based on your business scenario to ensure devices communicate with IoT Platform correctly after migration.

Item

Solution

References

AMQP server-side subscription

If you use an SDK to connect an AMQP client to IoT Platform, specify the ID and endpoint of the destination Enterprise Edition instance and configure a new AMQP client. During phased migration, specify the latest consumer group ID and start the new AMQP client.

Start both AMQP clients at the same time so they concurrently receive data from the source public instance and the destination Enterprise Edition instance, preventing data loss.

Connect an AMQP client to IoT Platform

Data forwarding

Configure a data forwarding rule for the public instance.

  • Specify a topic to receive messages for migration task events on the public instance and subscribe to migration task status changes.

    When a device is migrated, a notification message is forwarded.

  • Forward and store device information in your database.

    During instance migration, the system migrates the data forwarding rule and updates the source public instance ID in the database to the destination Enterprise Edition instance ID.

IoT Platform API calls

Develop an application based on your business requirements. Before calling an IoT Platform API operation, query the database to obtain the Enterprise Edition instance ID. Then, set the IotInstanceId parameter to this ID and call the API operation.

Instance migration

After modifying the business system and releasing the application, use the instance migration feature to migrate shared devices from the public instance. The following figure shows the migration process.Migration process

Sequence number

Step

Description

1~1.2

Debug the shared devices to be migrated from the public instance.

When a customer uses the shared-service platform app to access shared services, the business application queries device information in the public instance.

You can call IoT Platform API operations through an Alibaba Cloud gateway to manage devices to be migrated without specifying an instance ID.

2~2.5

To start instance migration, perform the following steps:

  1. Step 1: Create a migration task.

  2. Step 2: Perform phased migration.

In the IoT Platform console, create and start an instance migration task to perform phased migration.

  • Migrate a specified product, rules engine data, and selected device data from the public instance to the Enterprise Edition instance. The devices are forcibly disconnected.

  • When you reconnect the devices, they automatically connect to the Enterprise Edition instance. The migrated data is forwarded to the business server, which updates the device information in the database.

  • After verifying the phased-migration devices, configure and restart a new AMQP client with the consumer group ID generated during phased migration to receive data.

3

Step 3: Perform full migration.

In the IoT Platform console, start a full migration task to migrate all remaining devices of a specified product to the Enterprise Edition instance. The process is the same as phased migration.

Note

The full migration task applies to all devices except those already migrated during phased migration.

4~4.2

Verify the shared devices that are migrated to the Enterprise Edition instance.

A customer can use the shared-service platform app to access shared services without needing the instance ID. The business application queries device information in the Enterprise Edition instance.

To call IoT Platform API operations to manage migrated devices through an Alibaba Cloud gateway, you must specify an instance ID.

Note

If shared services work as expected after all devices are migrated, the instance migration is complete.

If an error occurs when accessing shared services, use the rollback feature to migrate the devices back to the public instance while keeping other data unchanged. For more information, see Migrate the resources of an instance.