Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update how to manually switch node role of mysql and redis, add redis… #5861

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/zh/docs/middleware/mysql/user-guide/manual-switch-role.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# MySQL 手动切换主备节点

MySQL 手动切换主备功能允许数据库管理员在主服务器出现故障或需要维护时,手动将备份服务器提升为新的主服务器。
通过执行适当的命令和配置,确保数据一致性和服务的连续性,从而实现高可用性。

## 注意事项

1. 确保主节点和备节点的数据一致性,避免在切换过程中出现数据丢失或不一致。
2. 在切换之前,确认实例的状态为运行中。

## 操作步骤

1. 点击进入目标 MySQL 实例的详情页
2. 在概览页的右上角,点击 **切换主备**
3. 展开备节点的下拉框,可以指定升级为主节点的备节点

![mysql-switch-role](../images/change-role.png){: width=1000px}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docs/zh/docs/middleware/redis/user-guide/backup-and-restore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Redis 备份还原

Redis 会在指定的时间间隔内自动生成数据快照,并将其保存为 `.rdb` 文件。
Redis 的备份与还原功能可以确保数据持久性和安全性。本文将介绍如何执行 Redis 缓存服务数据的备份与还原操作。

## 前提条件

在开始给 Redis 实例备份前,请确认当前工作空间的`备份配置`中已有配置验证过的 S3 存储。

![backup](../images/backup-restore.png)

## 备份配置

1. 从实例列表中选择目标进行部分的 Redis 实例
2. 点击左侧菜单的 **备份管理** -> **备份设置**
3. 在当前页面选择备份存储的 S3 存储,并填写要存储的路径地址

!!! note

Redis 备份数据通常通过 RDB 文件实现。在配置备份路径时,您只需指定存储文件夹名称和 .rdb 文件扩展名即可。

4. 如需每天或每周定时自定备份,可开启自动备份功能,选择备份的周期和时间。

![backup](../images/backup-restore-1.png)

## 备份数据

1. 从实例列表中选择目标进行部分的 Redis 实例
2. 点击左侧菜单的 **备份管理** -> **备份数据**
3. 点击列表右上的 **创建备份** ,填写备份名称

![backup](../images/backup-restore-2.png)

4. 点击**确定**后可在列表中查看备份状态、备份时间以及路径等信息。

![backup](../images/backup-restore-3.png)

## 恢复数据

1. 在备份数据列表中选择准备恢复的数据,点击备份数据列表最后一列的操作按钮,单击 **恢复**

可选择恢复在当前实例所在集群和命名空间,或恢复到其他集群和命名空间。

![alt text](../images/backup-restore-4.png)

2. 点击**确定**后,可查看数据恢复的状态。

![backup](../images/backup-restore-5.png)
33 changes: 33 additions & 0 deletions docs/zh/docs/middleware/redis/user-guide/manual-switch-role.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Redis 手动切换主备

在 Redis 缓存服务中,通过手动切换主从角色,可以在主节点发生故障或需要维护时,确保系统的持续运行。
本文将介绍如何通过 UI 手动切换 Redis 的主从角色,并讨论使用场景和限制。

## 使用场景

1. **故障恢复:** 当主节点出现故障时,可以将从节点提升为新的主节点,以确保服务的连续性。
2. **负载均衡:** 在高负载情况下,可以通过切换主从角色来分散请求,提升系统的响应能力。
3. **测试环境:** 在开发和测试环境中,手动切换主从角色可以帮助开发人员验证系统的容错能力和数据一致性。

## 集群模式

1. 点击目标 Redis 实例的名称,进入其详情页。
2. 在需要进行主备切换的实例的容器组列表中,点击分片名称前面的图标,展开当前分片下所有节点。
3. 如需对某一组分片中的主备节点角色进行切换,可点击分片后的 **切换主从** 图表,将备节点升级为主节点。

![switch-role](../images/switch-role.png){: width=}

4. 展开备节点的下拉框可以指定升级为主节点的备节点。

![switch-role](../images/switch-role-1.png)

## 哨兵模式

1. 点击目标 Redis 实例的名称,进入其详情页
2. 在概览页的右上角,点击 **切换主备**

![switch-role](../images/switch-role-2.png)

3. 展开备节点的下拉框,可以指定升级为主节点的备节点

![switch-role](../images/switch-role-3.png)
10 changes: 7 additions & 3 deletions docs/zh/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ nav:
- 更新 MySQL 实例: middleware/mysql/user-guide/update.md
- 删除 MySQL 实例: middleware/mysql/user-guide/delete.md
- 查看 MySQL 实例: middleware/mysql/user-guide/view.md
- 手动切换主备节点: middleware/mysql/user-guide/manual-switch-role.md
- 查看 MySQL 日志: middleware/mysql/user-guide/logs.md
- MySQL 慢日志: middleware/mysql/user-guide/mysql-slow-query.md
- 实例拓扑: middleware/mysql/user-guide/instancemap.md
Expand Down Expand Up @@ -1085,12 +1086,15 @@ nav:
- 离线升级 Redis: middleware/redis/intro/offline-install.md
- Release Notes: middleware/redis/release-notes.md
- 快速入门:
- 创建 Redis 实例: middleware/redis/user-guide/create.md
- 更新 Redis 实例: middleware/redis/user-guide/update.md
- 删除 Redis 实例: middleware/redis/user-guide/delete.md
- 实例生命周期管理:
- 创建 Redis 实例: middleware/redis/user-guide/create.md
- 更新 Redis 实例: middleware/redis/user-guide/update.md
- 删除 Redis 实例: middleware/redis/user-guide/delete.md
- 手动切换主备: middleware/redis/user-guide/manual-switch-role.md
- 查看 Redis 日志: middleware/redis/user-guide/logs.md
- 慢查询: middleware/redis/user-guide/slow-query.md
- 实例拓扑: middleware/redis/user-guide/instancemap.md
- 备份与恢复: middleware/redis/user-guide/backup-and-restore.md
- 最佳实践:
- 单集群跨机房高可用部署: middleware/redis/best-practice/singleclustercrosszone.md
- 跨集群数据同步介绍: middleware/redis/best-practice/index.md
Expand Down
Loading