写点什么

YashanDB 滚动升级回退

作者:YashanDB
  • 2025-03-07
    广东
  • 本文字数:1120 字

    阅读完需:约 4 分钟

本文内容来自 YashanDB 官网,原文内容请见 https://doc.yashandb.com/yashandb/23.3/zh/%E5%AE%89%E8%A3%85%E5%92%8C%E5%8D%87%E7%BA%A7/%E5%8D%87%E7%BA%A7/%E5%8D%87%E7%BA%A7%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86/%E6%BB%9A%E5%8A%A8%E5%8D%87%E7%BA%A7%E5%9B%9E%E9%80%80.html


数据库升级过程中可能因为网络故障、命令错误、配置文件错误及版本错误等原因导致数据库升级失败,此时请运行升级回退恢复升级前环境。


Warn:

  • 仅升级失败才允许回退。

  • 升级回退的过程中会重启备库。

  • 若升级失败且回退仍失败,请联系 YashanDB 技术支持解决。


升级成功后,执行回退会报错:


$ ./bin/yasboot cluster rollback -c yashandb --rollingyashandb can't rollback because upgrade result is success
复制代码

# 步骤 1:回退数据库

升级失败时执行升级回退预期结果:


$ ./bin/yasboot cluster rollback -c yashandb --rolling type  | uuid             | name                 | hostid   | index        | status  | return_code | progress | cost --------------------------------------------------------------------------------------------------------------------- task  | c82ebcbb5fb4acd3 | RollbackYasdbCluster | -        | yashandb     | SUCCESS | 0             | 100      | -   ------+------------------+------------------------+--------+--------------+---------+---------------+----------+---- task completed, status: SUCCESS
复制代码


参数介绍:


-c, --cluster 集群名称--rolling 滚动升级回退
复制代码


若出现回退失败,且提示主库数量为 0,请通过应用手段停止用户业务后使用以下命令重启旧版本数据库:


$ ./bin/yasboot cluster restart -c yashandb type | uuid             | name                | hostid | index    | status  | return_code | progress | cost------------------------------------------------------------------------------------------------------------- task | 93639d0b633d4eeb | ReStartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | -------+------------------+---------------------+--------+----------+---------+-------------+----------+------task completed, status: SUCCESS
复制代码

# 步骤 2:回退 yasom 与 yasagent

$ ./bin/yasboot package rollback -c yashandb -t /home/yashan/install/hosts.toml rollback package...host0001 100% [====================================================================]    2s
复制代码


参数介绍:


-c, --cluster 集群名称-t, --toml  需要服务器配置文件hosts.toml,此处指部署旧版本时生成的hosts.toml文件
复制代码


发布于: 刚刚阅读数: 5
用户头像

YashanDB

关注

全自研国产新型大数据管理系统 2022-02-15 加入

还未添加个人简介

评论

发布
暂无评论
YashanDB滚动升级回退_数据库_YashanDB_InfoQ写作社区