本文更新于2026-06-04 18:50
1、回退前提与准备工作
1.1 回退前置条件确认
前提:客户端通过推送升级方式推送成功,失败后是不会更新代码
需要连接管理节点数据库更改版本号
1.2 回退准备
1.2.1 资源配置不低于原客户节点,网络连通性正常
1.2.2 权限配置等同root
2、回退操作流程
2.1 进入安装目录 停止当前服务
[root@pg15 agent-3.1.1]# ./unis_cn.sh stop
Stopping unispace server...
2.2 代码回退
2.2.1 将备份目录(安装目录下 tmp/backup)下 代码回退到安装目录覆盖
cp -r bin/ collect/ config/ RPMS/ /opt/agent-3.1.1/
2.3 页面版本号回退,要在管理服务器上操作
2.3.1 链接管理节点数据库,并且use mndb
[root@mn coder]# mysql -uusadmin -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 850
Server version: 10.5.19-MariaDB-log MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>use mndb;
2.3.1 在node_client表中根据名称和IP查询,如查询节点名称为’hxmn’,IP为’ 192.168.100.1xx’
select * from node_client where name='hxmn' and hostName='192.168.100.1xx';

2.3.2 在 node_client_properties 表中更新小版本号,clientId即为在 node_client查询到的Id字段
update node_client_properties set value=1 where clientId=1 and name='fixId';

3、回退完成验证标准
3.1 登录管理节点,资源组下客户端版本号跟原来一致
