A relay device (1, 201, 501) being an IO-Link master that is configured to relay data between a control device (3, 503) and a plurality of IO-Link devices (2, 2a, 2b, 502a, 502b), wherein the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) are control targets of the control device (3, 503) and operate in accordance with setting information (20, 20a, 20b, 520a, 520b), wherein the relay device (1, 201, 501) comprises: a plurality of device communication ports (12a, 12b) as communication ports, wherein each one of the plurality of device communication ports (12a, 12b) is configured for communicating with a respective one of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) for bidirectional exchange of 32-bytes data with the plurality of IO-Linc devices; a storage unit comprising a plurality of port storage areas (110a, 110b) disposed for each of the plurality of device communication ports (12a, 12b); a receiving unit configured for receiving a single instruction for executing a backup of the IO-Link devices (2, 2a, 2b, 502a, 502b), or a single instruction for executing a restoring of the IO-Link devices (2, 2a, 2b, 502a, 502b); and a backup control unit configured for executing the backup of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) by respectively acquiring the setting information (20, 20a, 20b, 520a, 520b) from the IO-Link devices (2, 2a, 2b, 502a, 502b) through the plurality of device communication ports (12a, 12b) and storing the acquired setting information (20, 20a, 20b, 520a, 520b) in the respective port storage areas (110a, 110b) of the storage unit in accordance with the single instruction for executing the backup of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) received by the receiving unit and a restoring control unit configured for executing the restoring of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) by transmitting the setting information (111, 111a, 111b, 510a, 510b) stored in the respective port storage areas (110a, 110b) of the storage unit to the IO-Link devices (2, 2a, 2b, 502a, 502b) through the plurality of device communication ports (12a, 12b) and storing the setting information (111, 111a, 111b, 510a, 510b) in the IO-Link devices (2, 2a, 2b, 502a, 502b) in accordance with the single instruction for executing the restoring of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) received by the receiving unit. a plurality of device communication ports (12a, 12b) as communication ports, wherein each one of the plurality of device communication ports (12a, 12b) is configured for communicating with a respective one of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) for bidirectional exchange of 32-bytes data with the plurality of IO-Linc devices; a storage unit comprising a plurality of port storage areas (110a, 110b) disposed for each of the plurality of device communication ports (12a, 12b); a receiving unit configured for receiving a single instruction for executing a backup of the IO-Link devices (2, 2a, 2b, 502a, 502b), or a single instruction for executing a restoring of the IO-Link devices (2, 2a, 2b, 502a, 502b); and a backup control unit configured for executing the backup of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) by respectively acquiring the setting information (20, 20a, 20b, 520a, 520b) from the IO-Link devices (2, 2a, 2b, 502a, 502b) through the plurality of device communication ports (12a, 12b) and storing the acquired setting information (20, 20a, 20b, 520a, 520b) in the respective port storage areas (110a, 110b) of the storage unit in accordance with the single instruction for executing the backup of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) received by the receiving unit and a restoring control unit configured for executing the restoring of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) by transmitting the setting information (111, 111a, 111b, 510a, 510b) stored in the respective port storage areas (110a, 110b) of the storage unit to the IO-Link devices (2, 2a, 2b, 502a, 502b) through the plurality of device communication ports (12a, 12b) and storing the setting information (111, 111a, 111b, 510a, 510b) in the IO-Link devices (2, 2a, 2b, 502a, 502b) in accordance with the single instruction for executing the restoring of the plurality of IO-Link devices (2, 2a, 2b, 502a, 502b) received by the receiving unit.