Return whether this node is primary, replica, or sentinel and related metadata.

Section: Replication and failover

Inspect node role

bash
bash
ROLE

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Replication and failover
Make server replicate from a primary
Turn the current node into a replica of a primary.
OpenIn sheetbashsame section
Promote a replica
Stop replicating and promote current node to primary.
OpenIn sheetbashsame section
Trigger coordinated failover
Ask a primary to hand off leadership to a replica.
OpenIn sheetbashsame section
Partial resynchronization handshake
Replication handshake command used internally by replicas.
OpenIn sheetbashsame section
Wait for replicas to acknowledge writes
Block until writes reach a minimum number of replicas or timeout.
OpenIn sheetbash2 tag match
Read time of last successful save
Return the Unix timestamp of last successful save.
OpenIn sheetbash1 tag match