You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
升级流程
升级说明
一. 前置检查
1. 确认所有工单均全部结束
即工单状态全部为 上线成功, 上线失败, 已关闭 三个状态之一
二. 停止旧版SQLE
略
三. 备份数据
1. 在命令行中执行如下命令
此命令会在当前目录下生成sqle-bak.sql文件, 此文件即为备份文件
执行命令
mysqldump -u{MySQL用户名} -p{MySQL密码} {SQLE数据库名} >./sqle-bak.sql
执行效果
四. 元数据升级
1. 准备升级脚本
将下方压缩包拷贝到SQLE数据库所在机器上并解压, 内含三个文件(ddl.sql, dml.sql, clean.sql)
解压命令
压缩包
upgrade-sqle-2211-sql.tar.gz
压缩包MD5
upgrade-sqle-2211-sql.tar.gz.md5.txt
执行效果
2. 执行 ddl.sql
如果在执行升级流程前已经启动过新版SQLE, 需要跳过这一步
执行命令
mysql -u{mysql用户名} -p{mysql用户密码} -D{SQLE数据库名} --default-character-set=utf8mb4 <./upgrade-sqle-2211-sql/ddl.sql
执行效果
3. 执行 dml.sql
执行命令
mysql -u{mysql用户名} -p{mysql用户密码} -D{SQLE数据库名} --default-character-set=utf8mb4 <./upgrade-sqle-2211-sql/dml.sql
执行效果
五. 升级并启动新版SQLE
#433
六. 替换scannerd
scannerd和之前用法一致, 增加了
-J
参数用于指定项目, 需要将所有正在运行的scannerd 全部替换为新版scannerd, 并在原启动命令基础上增加-J default
参数, 这个参数表示指定default项目(升级会将旧的扫描任务全部转移到default项目中)新版 scannerd 还支持自定义超时时间, 可按需配置, 详见帮助文档
./scannerd -h
七. 数据检查
社区版可能会少一些界面, 忽略那些检查即可
检查项
项目管理界面有
default
这个项目default 项目中工单界面内容和之前一致
default 项目中智能扫描列表和之前数据一致
智能扫描详情和之前一致(SQL池, 审核记录, 审核记录详情)
default 项目中数据源列表和之前一致, 实例详情和之前一致
default 项目中可以看到所有用户和用户组, 且角色绑定关系和之前一致, 如果之前角色没有绑定实例, 则在此处不会显示绑定关系
default 项目中可以看到所有非
default_
开头的规则模板, 且数据源绑定关系和之前一致default 项目的规则模板改名为
default-WorkflowTemplate
, 如果之前默认流程模板(default
)没删的话流程应当和之前的默认模板一致default 项目的白名单内容应当和之前一致
全局用户管理处应当可以看到之前的所有用户, 且用户组绑定关系正确
全局用户组管理处应当可以看到之前的所有用户组, 且用户绑定关系正确
全局角色页面应当可以看到之前所有的角色, 且多了
dba
,dev
两个角色(如果之前不存在这两个角色)全局规则模板处应当可以看到之前所有以
default_
开头的规则模板, 且内容和绑定的数据源与之前一致规则页面可以看到规则说明(数据库类型MySQL)
检查scanner正确升级
./scannerd -h
, 输出的帮助信息中应当有-T
参数八. 清理垃圾(可选)
执行命令
mysql -u{mysql用户名} -p{mysql用户密码} -D{SQLE数据库名} --default-character-set=utf8mb4 <./upgrade-sqle-2211-sql/clean.sql
执行效果
升级内容
进入SQLE表
流程模板
项目
扫描任务
SQL工作台
白名单
工单
规则(#1021 和 #1124)
成员(不包含角色绑定关系)
成员组(不包含角色绑定关系)
实例(不包含角色绑定关系)
全局权限(如创建项目权限)
角色及绑定关系
清理垃圾(默认被注释, 保留旧数据以防万一)
Beta Was this translation helpful? Give feedback.
All reactions