You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-how-to-clone.md
+65-91Lines changed: 65 additions & 91 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,73 +109,55 @@ This section provides specific instructions for migrating the hub.
109
109
110
110
1. Select **Export template** from the list of properties and settings for the hub.
111
111
112
-

112
+
:::image type="content" source="./media/iot-hub-how-to-clone/iot-hub-export-template.png" alt-text="Screenshot showing the command for exporting the template for the IoT Hub." border="true":::
113
113
114
114
1. Select **Download** to download the template. Save the file somewhere you can find it again.
115
115
116
-

116
+
:::image type="content" source="./media/iot-hub-how-to-clone/iot-hub-download-template.png" alt-text="Screenshot showing the command for downloading the template for the IoT Hub." border="true":::
117
117
118
118
### View the template
119
119
120
-
1. Go to the Downloads folder (or to whichever folder you used when you exported the template) and find the zip file. Open the zip file and find the file called `template.json`. Select it, then select Ctrl+C to copy the template. Go to a different folder that's not in the zip file and paste the file (Ctrl+V). Now you can edit it.
120
+
1. Go to the Downloads folder (or to whichever folder you used when you exported the template) and find the zip file. Extract the zip file and find the file called `template.json`. Select and copy it. Go to a different folder and paste the template file (Ctrl+V). Now you can edit it.
121
121
122
-
The following example is for a generic hub with no routing configuration. It is an S1 tier hub (with 1 unit) called **ContosoTestHub29358** in region **westus**. Here is the exported template.
122
+
The following example is for a generic hub with no routing configuration. It is an S1 tier hub (with 1 unit) called **ContosoHub** in region **westus**. Here is the exported template.
Next, you'll find that the values for **path** contain the old hub name. Change them to use the new one. These are the path values under **eventHubEndpoints** called **events** and **OperationsMonitoringEvents**.
266
-
267
-
When you're done, your event hub endpoints section should look like this:
#### Update the keys for the routing resources that are not being moved
294
262
295
263
When you export the Resource Manager template for a hub that has routing configured, you will see that the keys for those resources are not provided in the exported template -- their placement is denoted by asterisks. You must fill them in by going to those resources in the portal and retrieving the keys **before** you import the new hub's template and create the hub.
@@ -347,35 +315,41 @@ Create the new hub in the new location using the template. If you have routing r
347
315
348
316
1. Select **Create a resource**.
349
317
350
-
1. In the search box, put in "template deployment" and select Enter.
318
+
1. In the search box, type "template deployment" and select Enter.
351
319
352
320
1. Select **template deployment (deploy using custom templates)**. This takes you to a screen for the Template deployment. Select **Create**. You see this screen:
353
321
354
-

322
+
:::image type="content" source="./media/iot-hub-how-to-clone/iot-hub-custom-deployment.png" alt-text="Screenshot showing the command for building your own template":::
355
323
356
324
1. Select **Build your own template in the editor**, which enables you to upload your template from a file.
357
325
358
-
1. Select **Load file**.
326
+
1. Select **Load file**.
359
327
360
-

328
+
:::image type="content" source="./media/iot-hub-how-to-clone/iot-hub-upload-file.png" alt-text="Screenshot showing the command for uploading a template file":::
361
329
362
330
1. Browse for the new template you edited and select it, then select **Open**. It loads your template in the edit window. Select **Save**.
363
331
364
-

332
+
:::image type="content" source="./media/iot-hub-how-to-clone/iot-hub-uploaded-file.png" alt-text="Screenshot showing loading the template":::
333
+
334
+
1. Fill in the following fields on the custom deployment page.
335
+
336
+
**Subscription**: Select the subscription to use.
337
+
338
+
**Resource group**: Create a new resource group in a new location. If you already have one set up, you can select it instead of creating a new one.
365
339
366
-
1. Fill in the following fields.
340
+
**Region**: If you selected an existing resource group, the region is filled in for you to match the location of the resource group. If you created a new resource group, this will be its location.
367
341
368
-
**Subscription**: select the subscription to use.
342
+
**Connection string**: Fill in the connection string for your hub.
369
343
370
-
**Resource group**: create a new resource group in a new location. If you already have a new one set up, you can select it instead of creating a new one.
344
+
**Hub name**: Give the new hub in the new region a name.
371
345
372
-
**Location**: If you selected an existing resource group, this is filled in for you to match the location of the resource group. If you created a new resource group, this will be its location.
346
+
:::image type="content" source="./media/iot-hub-how-to-clone/iot-hub-custom-deployment-create.png" alt-text="Screenshot showing the custom deployment page":::
373
347
374
-
**I agree checkbox**: this basically says that you agree to pay for the resource(s) you're creating.
348
+
1. Select the **Review + create** button.
375
349
376
-
1. Select the **Purchase** button.
350
+
1. Select the **Create** button. The portal validates your template and deploys your cloned hub. If you have routing configuration data, it will be included in the new hub, but will point at the resources in the prior location.
377
351
378
-
The portal now validates your template and deploys your cloned hub. If you have routing configuration data, it will be included in the new hub, but will point at the resources in the prior location.
352
+
:::image type="content" source="./media/iot-hub-how-to-clone/iot-hub-custom-deployment-final.png" alt-text="Screenshot showing the final custom deployment page":::
0 commit comments