failover
failover [to host]
The failover command performs a failover to promote an existing replica to primary after the current
primary has failed. The primary data source must be in a failed state to use failover. If the primary data
source is not failed, you should instead use switch.
If there is no argument the failover command selects the most caught up replica and promotes it as the
primary. You can also specify a particular host, in which case failover will ensure that the
chosen replica is fully up-to-date and promote it.
Failover ensures that the replica has applied all transactions present in its log, then promotes the replica to primary. It
does not attempt to retrieve transactions from the old primary, as this is by definition already failed. After promoting the
chosen replica to primary, failover reconfigures other replicas to point to it and ensures all data sources are online.
To recover a failed primary you should use the datasource recover command.
Failover to any up-to-date replica in the cluster. If no replica is available the operation fails:
cctrl> failover
Failover from a broken primary to a specific node:
cctrl> failover to mercury