A relay device being an IO-Link master that is configured to relay data between a control device and a plurality of IO-Link devices , wherein the plurality of IO-Link devices are control targets of the control device and operate in accordance with setting information , wherein the relay device comprises: a plurality of device communication ports as communication ports, wherein each one of the plurality of device communication ports is configured for communicating with a respective one of the plurality of IO-Link devices for bidirectional exchange of 32-bytes data with the plurality of IO-Linc devices; a storage unit comprising a plurality of port storage areas disposed for each of the plurality of device communication ports ; a receiving unit configured for receiving a single instruction for executing a backup of the IO-Link devices , or a single instruction for executing a restoring of the IO-Link devices ; and a backup control unit configured for executing the backup of the plurality of IO-Link devices by respectively acquiring the setting information from the IO-Link devices through the plurality of device communication ports and storing the acquired setting information in the respective port storage areas of the storage unit in accordance with the single instruction for executing the backup of the plurality of IO-Link devices received by the receiving unit and a restoring control unit configured for executing the restoring of the plurality of IO-Link devices by transmitting the setting information stored in the respective port storage areas of the storage unit to the IO-Link devices through the plurality of device communication ports and storing the setting information in the IO-Link devices in accordance with the single instruction for executing the restoring of the plurality of IO-Link devices received by the receiving unit . a plurality of device communication ports as communication ports, wherein each one of the plurality of device communication ports is configured for communicating with a respective one of the plurality of IO-Link devices for bidirectional exchange of 32-bytes data with the plurality of IO-Linc devices; a storage unit comprising a plurality of port storage areas disposed for each of the plurality of device communication ports ; a receiving unit configured for receiving a single instruction for executing a backup of the IO-Link devices , or a single instruction for executing a restoring of the IO-Link devices ; and a backup control unit configured for executing the backup of the plurality of IO-Link devices by respectively acquiring the setting information from the IO-Link devices through the plurality of device communication ports and storing the acquired setting information in the respective port storage areas of the storage unit in accordance with the single instruction for executing the backup of the plurality of IO-Link devices received by the receiving unit and a restoring control unit configured for executing the restoring of the plurality of IO-Link devices by transmitting the setting information stored in the respective port storage areas of the storage unit to the IO-Link devices through the plurality of device communication ports and storing the setting information in the IO-Link devices in accordance with the single instruction for executing the restoring of the plurality of IO-Link devices received by the receiving unit . <EOS>