# Automically changing gateway device connections for a backup

**URL:** <https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 28, 2022, 9:08am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703 "2022-03-28T09:08:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayden](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@hayden](https://forum.inductiveautomation.com/u/hayden)\
**Post date:** [March 28, 2022, 9:08am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/1 "2022-03-28T09:08:31Z")

</div>

Hey all,  
We’re currently working on a project with multiple gateways, and redundancies.

One system we’re working on is wanting two sites to have essentially identical systems but with one being a backup and the other being a main system. The catch is that both of these will also have their own redundant backups, so they can’t just be a redundant pair.

We’re looking into using EAM to do weekly backups where the main systems project is sent to this remote backup and using data splitters to ensure the data is synced. The issue is that sometimes the device IPs are modified and we want this to be updated as well.

Because these gateways may be connected to up to 40 devices I don’t want the commissioning engineers to edit the device data more than once if possible as that could get very annoying if several devices get updated.

Is there a way to send changes to the device connections regularly.

Thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 28, 2022, 12:37pm UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/2 "2022-03-28T12:37:32Z")

</div>

You’d have to script it via [system.device.setDeviceHostname()](https://docs.inductiveautomation.com/display/DOC81/system.device.setDeviceHostname). Create a gateway message handler that accepts a device name and IP address in its payload. Call it remotely.

---

<div class="post-metadata">

**Author:** ![hayden](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@hayden](https://forum.inductiveautomation.com/u/hayden)\
**Post date:** [March 29, 2022, 12:12am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/3 "2022-03-29T00:12:22Z")

</div>

Hey, thanks for reply  
Gateway message handler could be a good way to handle it.

If I’m correct though you can’t read the hostname from devices on your system, so I’d need to have some kind of work around like storing them in tags and having the engineers change IP’s through a screen on the SCADA, otherwise this will just be operators typing it twice but with extra steps.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [March 29, 2022, 1:33am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/4 "2022-03-29T01:33:08Z")

</div>

Can you store the device hostnames in a database table? That way the device IPs are stored outside of the gateway backup.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [March 29, 2022, 1:55am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/5 "2022-03-29T01:55:36Z")

</div>

Do your device hostnames show up in the tag tree under device diagnostics folder?

> [@system.device.getDeviceHostname?](https://forum.inductiveautomation.com/t/system-device-getdevicehostname/12460/2):
>
> If you browse to your device with the OPC Browser you will see that it contains a Diagnostics folder. Within the Diagnostics folder is a tag that contains the hostname. You can drag this tag into the Tag Browser and then read the value in your script with the system.tag.read() function.

---

<div class="post-metadata">

**Author:** ![hayden](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@hayden](https://forum.inductiveautomation.com/u/hayden)\
**Post date:** [March 29, 2022, 2:14am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/6 "2022-03-29T02:14:27Z")

</div>

As the engineers will only ever use the main node for modification I think this would be functionally the same as storing in tags and updating. I don’t believe we have a separate system for the databases either, they’re all locally stored, so it wouldn’t be more secure anyway.

---

<div class="post-metadata">

**Author:** ![hayden](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@hayden](https://forum.inductiveautomation.com/u/hayden)\
**Post date:** [March 29, 2022, 2:17am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/7 "2022-03-29T02:17:51Z")

</div>

If I got to the devices in system tags I only see description, enabled, name and status. Unfortunately we’re using DNP3 drivers for all of our stations so we can’t access a lot of this extra diag data you would get from a logix driver.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 29, 2022, 9:57am UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/8 "2022-03-29T09:57:04Z")

</div>

> [@hayden](#):
>
> description, enabled, name and status

Those are all available from `system.device.listDevices`.

---

<div class="post-metadata">

**Author:** ![Brandon\_Glover](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@Brandon\_Glover](https://forum.inductiveautomation.com/u/Brandon_Glover)\
**Post date:** [August 22, 2022, 12:37pm UTC](https://forum.inductiveautomation.com/t/automically-changing-gateway-device-connections-for-a-backup/57703/9 "2022-08-22T12:37:01Z")

</div>

New to Ignition and I’ve been looking thought the forums for away to get the description of devices added to the gateway. `system.device.listDevices` will provide a driver type but is there someway to pull the description as well?
