Use the pdbcli upgrade command to upgrade cluster components.
Upgrade the high availability component:
pdbcli upgrade cmUpgrade the database engine:
pdbcli upgrade dbUpgrade the cluster proxy component:
pdbcli upgrade proxyUpgrade other cluster components:
Data backup component:
pdbcli upgrade backupMonitoring component:
pdbcli upgrade monitorTask execution component:
pdbcli upgrade agent
When you upgrade the database engine, first upgrade the standby node. Then, perform a failover to switch to the standby node. Finally, upgrade the original primary node. During this process, you may need to confirm multiple prompts. Verify each prompt carefully.
After the upgrade is complete, use the
pdbcli statuscommand to view the cluster status. Ensure that the upgrade is successful and the cluster is running.
During the cluster upgrade, the following confirmation prompts are displayed:
pdbcli upgrade db
Using config file: ./config.yaml
WARNING - Are you sure you want to upgrade PolarDB DB Cluster component on TARGET(10.XX.XX.2) ? Type 'yes' to upgrade your cluster. [no]: (yes/no):
WARNING - Are you sure to perform failover operation to TARGET(10.XX.XX.2)? Type 'yes' perform. [no]: (yes/no):
WARNING - Are you sure you want to upgrade PolarDB DB Cluster component on TARGET(10.XX.XX.1) ? Type 'yes' to upgrade your cluster. [no]: (yes/no): Run pdbcli help upgrade or pdbcli upgrade --help to view help information for cluster upgrade commands:
Using config file: ./config.yaml
Upgrade PolarDB Cluster Components.
For example:
pdbcli upgrade cm
Usage:
pdbcli upgrade [flags]
pdbcli upgrade [command]
Available Commands:
agent Upgrade PolarDB Agent Component
cm Upgrade PolarDB Cluster Manager Component
db Upgrade PolarDB DB Engine Component
pfsd Upgrade PolarDB PFSD Component
proxy Upgrade PolarDB Proxy Component
Flags:
-h, --help help for upgrade # Gets help information for the upgrade command.
--no-prompt No command line confirmation. # If you add this flag, command line confirmation prompts do not appear. Use this flag with caution.
--no-validate Skip config file validation. # Skips the configuration file validation step.
--start-at-task string Resumed failed task at last failed task name (INTERNAL USE ONLY). # If an operation fails, use this flag to retry from the failed step.
Global Flags:
--config string Specify Config file. (default "./config.yaml") # Specifies the configuration file. The default is ./config.yaml.
--debug Enable additional output for debugging. # Displays more output information for debugging.
Use "pdbcli upgrade [command] --help" for more information about a command.