mc table replicate failover
The mc table replicate failover command starts failover and promotion on a replica site.
Run this command against a replica when the primary site becomes unavailable and you want to promote the replica to accept write traffic. The command signals the catalog scanner to complete its current cycle at full speed, after which the site stops behaving as a replica and begins accepting client writes.
The command returns immediately. Promotion happens asynchronously when the scan cycle completes. After failover completes, the old primary requires manual intervention before it can rejoin the replication group. See Site Replication and Disaster Recovery for the full workflow.
Prevent divergent writes
Promote a replica only when the primary site is unavailable to clients. If clients can still reach the old primary, stop or reroute that traffic first: while two sites are both writable, they can accept divergent changes that must be reconciled when you recover the old primary.
The following command starts failover on the myreplica MinIO AIStor cluster:
mc table replicate failover myreplicaThe command has the following syntax:
mc [GLOBALFLAGS] table replicate failover ALIAS- Brackets
[]indicate optional parameters. - Parameters sharing a line are mutually dependent.
- Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
ALIAS
Required
The alias of the replica MinIO AIStor cluster to promote.
Global flags
This command supports any of the global flags.
Examples
Start failover on a replica site
mc table replicate failover myreplicaAfter failover completes, monitor the site with mc table replicate status:
mc table replicate status myreplica