Skip to main content
RuiChang
Staff
Staff
August 28, 2025

Technical Tip: Database leader manual switchover or failover via Patroni

  • August 28, 2025
  • 0 replies
  • 377 views

Description

 

This article describes methods to switchover or failover the database leader manually via Patroni.

 

Scope

 

FortiSIEM v7.3.0 and above.

 

Solution

 

Failover steps:

If users notice the database leader is not configured as expected, users may execute the following commands to failover to the desired node:

 

  1. Get the Patroni table and node name:

 

patronictl -c /etc/patroni/patroni.yml list

 

  1. Use the failover command, inputting the node name to set as the new database Leader:

patronictl -c /etc/patroni/patroni.yml failover

 

Switchover steps:

Follow the steps below if there is no issue with the current database leader, and another node needs to be promoted as the new database leader.

 

  1. Get the Patroni table and node name:


patronictl -c /etc/patroni/patroni.yml list

 

  1. Use the switchover command, inputting the node name to set as the new database Leader:

patronictl -c /etc/patroni/patroni.yml switchover --leader <Current leader node> --candidate <Node to be promoted> --force