openGauss学习笔记-183 openGauss 数据库运维-升级-升级操作183.1 就地升级和灰度升级操作步骤
介绍就地升级、灰度升级和滚动升级的详细操作。
以root身份登录节点。
创建新包目录。
mkdir -p /opt/software/gaussdb_upgrade
将需要更新的新包上传至目录“/opt/software/gaussdb_upgrade”并解压。
进入安装包解压出的script目录下:
cd /opt/software/gaussdb_upgrade/script
在就地升级或灰度升级前执行前置脚本gs_preinstall。
./gs_preinstall -U omm -G dbgrp -X /opt/software/GaussDB_Kernel/clusterconfig.xml
切换至omm用户。
su - omm
数据库状态正常时,使用如下命令进行就地升级或者灰度升级。
示例一:使用gs_upgradectl脚本执行就地升级。
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml
示例二:使用gs_upgradectl脚本执行灰度升级。
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey
数据库状态正常时,使用如下命令进行滚动升级。
示例一:使用gs_upgradectl脚本执行指定单节点升级。
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey -h hostname0
示例二:使用gs_upgradectl脚本执行指定多节点升级。
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey -h hostname0,hostname1
数据库状态正常时,使用如下命令进行升级剩余节点。
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey --continue
👍 点赞,你的认可是我创作的动力!
⭐️ 收藏,你的青睐是我努力的方向!
✏️ 评论,你的意见是我进步的财富!
PS:因为公众号平台更改了推送规则,如果不想错过内容,记得读完点一下“在看”,加个“星标”,这样每次新文章推送才会第一时间出现在你的订阅列表里。点“在看”支持我吧!

原文作者:超哥的IT私房菜;如有侵权,请联系管理员删除。