当前位置:网站首页>容器化 | 在 NFS 备份恢复 RadonDB MySQL 集群数据
容器化 | 在 NFS 备份恢复 RadonDB MySQL 集群数据
2022-08-04 17:41:00 【RadonDB】
社区于上个月发布了 RadonDB MySQL Kubernetes v2.2.0,集群数据备份恢复的存储类型除了 S3,新增 NFS 存储。本文将为您演示如何进行 NFS 备份及恢复操作。
环境准备
- Kubernetes 集群
- RadonDB MySQL 集群
过程略,详细请回顾《快速实现 MySQL 高可用集群部署》。
安装 NFS 服务与资源
方法一:使用 Helm 安装
helm install demo charts/mysql-operator --set nfsBackup.installServer=true --set nfsBackup.volume.createLocalPV=true或者手动创建 PVC,再执行
helm install demo charts/mysql-operator --set nfsBackup.installServer=true --set nfsBackup.volume.specifiedPVC=XXXX用该方法,可以在安装 Operator 时,也将 NFS 服务的 Pod 和 Service 安装到集群中。
方法二:使用 kubectl 安装
kubectl apply -f config/samples/nfs_pv.yaml kubectl apply -f config/samples/nfs_server.yaml获取 nfsServerAddress
例如:
kubectl get svc nfs-server --template={{.spec.clusterIP}}10.98.253.82获取到 ClusterIP,即可以使用该地址进行 NFS 备份。这里 IP 地址为 10.96.253.82。
创建 NFS 备份
配置 NFS 服务的地址
# 文件 config/samples/mysql_v1alpha1_backup.yamlnfsServerAddress: "10.96.253.82"创建备份
kubectl apply -f config/samples/mysql_v1alpha1_backup.yaml注意:备份自定义资源与 MySQL 集群自定义资源必须在同一个命名空间中。
验证备份
使用如下命令,可以发现名称格式为 <cluster name>_<timestamp> 的备份文件夹。
kubectl exec -it <pod name of nfs server> -- ls /exports# 显示结果index.html initbackup sample_2022419101946备份恢复
从已有的 NFS 备份文件中恢复集群。配置 mysql_v1alpha1_cluster.yaml,将 nfsServerAddress 设置为 NFS 服务的地址。
...restoreFrom: "sample_2022419101946"nfsServerAddress: 10.96.253.82注意:
restoreFrom是备份路径的名称,可以从 NFS 服务加载的路径中看到。然后从 NFS 备份副本恢复集群,如下:
kubectl apply -f config/samples/mysql_v1alpha1_cluster.yaml恢复完成,已经从名为 sample_2022419101946 的 NFS 备份中恢复一个集群。
边栏推荐
- Learning to Explore - Setting the Foreground Color for Fonts
- Learning and Exploration-Introducing Baidu Statistics to the Website
- LeetCode Question of the Day - 1403. Minimum Subsequence in Non-Increasing Order
- R语言计算时间序列数据的逐次差分(successive differences):使用diff函数计算时间序列数据的逐次差分值
- Boost library study notes (1) Installation and configuration
- 关于ETL的两种架构(ETL架构和ELT架构)
- 【LeetCode每日一题】——540.有序数组中的单一元素
- 怎么面试程序员的?傲慢与无礼,就数他牛逼
- CAS:385437-57-0,DSPE-PEG-Biotin,生物活性分子磷脂-聚乙二醇-生物素
- R语言ggpubr包的ggline函数可视化折线图、设置add参数为mean_se和dotplot可视化不同水平均值的折线图并为折线图添加误差线(se标准误差)和点阵图、设置折线和数据点边框颜色
猜你喜欢

"Involution" Index Analysis Based on AHP

如何模拟后台API调用场景,很细!

IDEA以多端口启动同一个服务项目

】 【 LeetCode daily one problem - 540. The order of a single element of the array

Thrift IDL Sample File

餐饮供应链管理系统

CF86D Powerful array

Introduction of three temperature measurement methods for PT100 platinum thermal resistance

【Gazebo入门教程】第二讲 模型库导入与可视化机器人建模(模型编辑器)

框架整合(二)- 使用Apache ShardingSphere实现数据分片
随机推荐
Introduction of three temperature measurement methods for PT100 platinum thermal resistance
R语言缺失时间序列的填充及合并:补齐时间序列数据中所有缺失的时间索引、使用merge函数合并日期补齐之后的时间序列数据和另外一个时间序列数据(补齐左侧数据)
Codeforces Round #811 (Div. 3)
使用scikit-learn计算文本TF-IDF值
区间贪心(区间合并)
开发一套高容错分布式系统
mysqlbinlog 超过500g自动删除,保留7个,求大深给个版本
基于层次分析法的“内卷”指数分析
(一)、线性表的顺序存储结构链式存储结构
88. (the home of cesium) cesium polymerization figure
两个对象相同数据赋值
R语言glm函数使用频数数据构建二分类logistic回归模型,分析的输入数据为频数数据(多个分类指标对应的阴性样本和阳性样本的频数数据)、weights参数指定频数值
西西成语接龙小助手
吃透Chisel语言.32.Chisel进阶之硬件生成器(一)——Chisel中的参数化
(1), the sequential storage structure of linear table chain storage structure
离散化求前缀和
字节二面被问到mysql事务与锁问题,我蚌埠住了
JS中null与undefined的异同点
学习探索-给字体设置前景色
yarn详细入门教程