9.24.3.22. 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 Replica and Primary roles, for example during switchover.

trepctl setrole [ -role master | slave | relay | thl-applier | thl-client | thl-server ] [ -uri ]

Where:

Table 9.58. trepctl setrole Command Options

OptionDescription
-roleReplicator role
-uriURI of the Primary

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

shell> trepctl setrole -role master

When setting a Replica, the URI of the Primary can be optionally supplied:

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

See Section 6.3.5, “Understanding Replicator Roles” for more details on each role.