A gateway should be set up on one instance only having the corresponding GW binary installed on it. When moving it from one instance to another instance, you can follow the next step that will guide you on how to migrate a gateway correctly. In case you want to move a batch of resources (including gateways, devices, etc.), consult our support team.
You can chose one of the following method:
Reinstall Loriot GW binary
The most recommendable method is to uninstall the former GW binary and reinstall the current GW binary corresponding to the instance you want to move it.
Before setting up the gateway on the new server instance, connect to it via SSH. Make sure to stop the Loriot processes by finding the process number using the following commands:
ps ax | grep loriot or ps | grep lor
After that kill the running Loriot process.
For most of the gateway models, the /opt/lrt
directory and /etc/init.d/loriot-gw
file need to be removed.
This can be done using the following commands:
rm -r /opt/lrt rm /etc/init.d/loriot-gw
Subsequently, the gateway can be registered on the new server instance. For more information, see Register a Gateway
Update Loriot GW binary server URL
Connect to the gateway via SSH. Make sure to stop the Loriot processes by finding the process number using following commands:
ps ax | grep loriot or ps | grep lor
After that kill the running Loriot process.
Enter /opt/lrt or /user/lrt where the Loriot GW binary is been executing and run the binary manually using the new URL. See an example below :
./loriot-gw -s eu2.loriot.io
The binary will be executed in the background. Please make sure to remove the gateway from the previous server instance to avoid re-connection to it.
Enable Allow Next Update and restart the Loriot Gateway Binary from the UI.
Update "options" file on the gateway
A final possibility is to add the new instance parameter (e.g. -s.eu4pro.loriot.io) to the "options" file on the gateway.
Connect to the gateway via SSH and edit the file /opt/lrt/options (or /user/lrt/options) and replace the previous URL with the URL from the instance server you want to move the gateway to.
Subsequently, reboot the gateway. After the connection is re-established, the gateway will access the new URL.
Enable Allow Next Update and Restart the Loriot Gateway Binary from the UI.