8.18.3.16. trepctl setrole Command

The trepctl setrole command changes the role of the replicator service. This command can be used to change a configured host between slave and master roles, for example during switchover.

trepctl setrole [ -rolemasterrelayslave ] [ -uri ]

Where:

Table 8.39. trepctl setrole Command Options

OptionDescription
-roleReplicator role
-uriURI of the master

To change the role of a replicator, specify the role using the -role parameter. Th replicator must be offline when the role change is issued:

shell> trepctl setrole -role master

When setting a slave, the URI of the master can be optionally supplied:

shell> trepctl setrole -role slave -uri thl://host1:2112/