Skip to main content
Common Reference

trepctl setrole

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.

Usage
trepctl [ common-options ] setrole [ options ]

Where:

OptionDescriptionVersion
-roleReplicator role.
-urlURI 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

The valid options for the -role are shown below:

Valid valuesmasterslaverelaythl-serverthl-clientthl-applier

When setting a replica, the URI of the primary can optionally be supplied, for example:

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