Performing the Upgrade
This section describes how to perform the in-place upgrade and gray upgrade.
Procedure
Log in to a node as user root.
Create a directory for the new package.
mkdir -p /opt/software/gaussdb_upgrade
Upload the new package to the /opt/software/gaussdb_upgrade directory and decompress it.
Go to the script directory generated after the installation package is decompressed.
cd /opt/software/gaussdb_upgrade/script
Execute the gs_preinstall script before in-place upgrade or gray upgrade.
./gs_preinstall -U omm -G dbgrp -X /opt/software/GaussDB_Kernel/clusterconfig.xml
Switch to user omm.
su - omm
If the database is normal, run the following command to perform the in-place upgrade or gray upgrade:
Example 1: Use the gs_upgradectl script to perform an in-place upgrade.
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml
Example 2: Execute the gs_upgradectl script to perform a gray upgrade.
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey
If the database is normal, run the following command to perform specified nodes upgrade:
Example 1: Use the gs_upgradectl script to perform a specified node upgrade.
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey -h hostname0
Example 2: Use the gs_upgradectl script to perform multiple specified nodes upgrade.
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey -h hostname0,hostname1
If the database is normal, run the following command to perform the remaining nodes upgrade:
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey --continue