Usage Notes Overview

Updated at:

After installing pdbcli and preparing your config.yaml file, you can run commands from the working directory using the format pdbcli <command>. This document provides a reference for the pdbcli command-line interface (CLI), which is used to manage PolarDB for PostgreSQL (PolarFlex) clusters.

Note

You can run the pdbcli help command to view descriptions of all supported commands.

Command

Description

validate

Validates the cluster configuration file to ensure that required parameters are correct.

install cluster

Installs the PolarFlex software stack on all target nodes.

create cluster

Creates the target cluster based on the configuration file.

version

Displays the cluster version information.

status

Displays the cluster status.

upgrade

Upgrades the cluster. This includes the high availability (HA) components, database engine, cluster proxy, and other components.

cm

Manages the running status of the HA component (Cluster Manager) on target nodes. This includes starting, stopping, restarting, and querying the status of the component.

trace

Traces issues, such as collecting all component logs from each node.

dump

Dumps logs for all components.

failover

Performs a manual cluster failover.

restart cluster

Restarts all cluster components. This includes the HA components, database engine, cluster proxy, and other components.

rebuild

Rebuilds the database engine or other components on a specified node.

delete

Deletes a cluster or specified components on a node.

uninstall

Uninstalls the PolarFlex software stack from all target nodes.