Maintaining your cluster

Maintain your cluster with patronictl utility script that is located in /usr/bin.


Run the following command:
patronictl -c <PATH>/patroni_config.yaml <COMMAND> <CLUSTER_NAME>
  • <PATH>

    The Patroni configuration file name with file path.


    The patronictl command.


    The cluster name used in patroni_config.yaml file.

The following options are available on patronictl utility:
  configure    Create configuration file
  dsn          Generate a dsn for the provided member, defaults to a dsn of...
  edit-config  Edit cluster configuration
  failover     Failover to a replica
  flush        Flush scheduled events
  list         List the Patroni members for a given Patroni
  pause        Disable auto failover
  query        Query a Patroni PostgreSQL member
  reinit       Reinitialize cluster member
  reload       Reload cluster member configuration
  remove       Remove cluster from DCS
  restart      Restart cluster member
  resume       Resume auto failover
  scaffold     Create a structure for the cluster in DCS
  show-config  Show cluster configuration
  switchover   Switchover to a replica
  version      Output version of patronictl command or a running Patroni...