Move Iothub to another subscription

Jönsson, Tony 0 Reputation points
2023-01-31T19:54:29.2266667+00:00

Hi

How can I move a Iot hub from one subscription to another. I need to have same connectionstring, Hostname, sharedkey etc

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,115 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sander van de Velde 28,236 Reputation points MVP
    2023-01-31T23:13:49+00:00

    Hello @Jönsson, Tony ,

    moving an Azure IoT hub to another subscription is possible:

    User's image

    You need access to both subscriptions, probably with contributor or administrator rights.

    I expect the keys will be kept intact but I have not done this before so you need to test if everything keeps working on a test IoT Hub first.

    Expect an outage (no device communication and possible message loss) of the IoT Hub during the migration. Read this article about any risks and guidelines.

    It's recommended to connect devices indirectly to an IoT Hub using a Device Provisioning service!

    This makes you more flexible by moving devices from one IoT hub to another (a new one) with minimal risk of losing messages by reprovisioning and a smart allocation policy. (once all devices are migrated you can simply delete the old IoT Hub).


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

  2. QuantumCache 20,031 Reputation points
    2023-03-10T00:05:10.1933333+00:00

    Hi,

    In addition to the steps mentioned by Sander in the above response, i would like to mention few other points, hopefully it may be helpful to other reader as well.

    There are some potential disadvantages to moving an IoT hub to another subscription, including:

    1. Downtime: During the migration process, there may be some downtime as the hub is moved between subscriptions. This could potentially disrupt any devices that are currently connected to the hub.
    2. Configuration changes: When moving an IoT hub to another subscription, some configuration changes may be required, such as updating firewall rules or configuring new virtual networks. This can add additional complexity to the migration process.
    3. Data loss: In rare cases, data may be lost during the migration process, particularly if there are issues with the backup and restore process.
    4. Cost: Depending on the subscription and pricing plan, there may be additional costs associated with moving the IoT hub, such as transfer fees or higher pricing for certain services in the new subscription.
    5. Service interruptions: In some cases, there may be interruptions or issues with the IoT hub service after the migration, particularly if there are any compatibility issues with the new subscription or services.
    0 comments No comments