Rolling Back the Upgrade Version
This section describes how to roll back to the source version.
Procedure
Log in to the node as a database user (for example, omm).
Run the following command to roll back the kernel code. After the rollback is complete, run the gs_preinstall script in the old package to ensure that the kernel version is the same as the OM code version. For details, see Execute the gs_preinstall script.
gs_upgradectl -t auto-rollback -X /opt/software/GaussDB_Kernel/clusterconfig.xml
NOTE: If the database is abnormal, run the following command to forcibly roll back the upgrade:
gs_upgradectl -t auto-rollback -X /opt/software/GaussDB_Kernel/clusterconfig.xml --force
openGauss 3.X uses a new method to establish mutual trust relationship. If openGauss 2.X is upgraded to openGauss 3.X and then rolled back, perform the following steps after the rollback command is executed and before running the gs_preinstall command in the old package:
Delete the **/root/gauss_om/**Database username (for example, omm) directory on each node in the cluster.
To remove the mutual trust relationship between database users, log in to each node in the cluster, delete the crontab scheduled task, delete** ~/.ssh**, kill the mutual trust process, and delete the SSH_AUTH_SOCK and SSH_AGENT_PID environment variables.
Check the version number after the rollback.
gs_om -V | --version