当前位置:网站首页>备份和恢复Kubernetes集群中的Etcd数据
备份和恢复Kubernetes集群中的Etcd数据
2022-08-05 19:53:00 【InfoQ】

- 控制平面主机:p1.xufu.xyz、p2.xufu.xyz、p3.xufu.xyz
- 工作主机:p4.xufu.xyz、p5.xufu.xyz
- 主机系统:CentOS Linux release 7.9.2009 (Core)
- Etcd版本:3.5.1
Etcd
- 简介
- 访问
alias ectl='etcdctl --endpoints p1.xufu.xyz:2379 \ --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key \ --cacert=/etc/kubernetes/pki/etcd/ca.crt'ectl get / --prefix --keys-only- 备份

ectl snapshot save snapshot-$(date +%F)
- 恢复
systemctl stop kubelet.servicedocker stop apiservernamemv /var/lib/etcd /var/lib/etcd_oldmkdir /var/lib/etcdchmod 700 /var/lib/etcdectl snapshot restore /data/etcd_backup/etcd-snapshot-2022-08-03.db \ --name p1.xufu.xyz \ --initial-cluster "etcd-0=https://p1.xufu.xyz:2380,etcd-1=https://p2.xufu.xyz:2380,etcd-2=https://p3.xufu.xyz:2380" \ --initial-advertise-peer-urls https://p1.xufu.xyz:2380 \ --data-dir=/var/lib/etcd[[email protected] etcd]# ectl --endpoints=https://p1.xufu.xyz:2379,https://p2.xufu.xyz:2379,https://p3.xufu.xyz:2379 endpoint healthhttps://p2.xufu.xyz:2379 is healthy: successfully committed proposal: took = 100.193247msp1.xufu.xyz:2379 is healthy: successfully committed proposal: took = 111.234607mshttps://p1.xufu.xyz:2379 is healthy: successfully committed proposal: took = 113.788721mshttps://p3.xufu.xyz:2379 is healthy: successfully committed proposal: took = 118.403445ms边栏推荐
- 344. 反转字符串-双指针法
- 分享几个YYDS的Pycharm插件
- 142. Circular linked list II - double pointer method
- C#实现单例模式和实现思路
- Good code in the eyes of compiler engineers (1): Loop Interchange
- vi学习(1)【简介/基本使用/工作模式】
- Basic application of Js
- 回环设备(/dev/loop*)与losetup命令
- Score-CAM|用kernel加权解释CNN的预测结果
- The latest interface is about Douyin, get Douyin share password url API
猜你喜欢

Mysql数据库常用表结构操作语句

给根目录扩容

在docker容器里连接上本地mysql8.0.30数据库的方法

解决ping: www.baidu.com: Name or service not known

Understand the recommendation system in one article: Recall 08: Two-tower model - online service requires offline storage of item vectors, model update is divided into full update and incremental upda

IDEA使用问题-01 无法使用ibus输入中文

VMware - clone virtual machine

【ML】机器学习数据集:sklearn中回归数据集介绍

05 tp6 的数据添加 助手函数、 save、insert、strict、replace、insertGetId、insertAll《ThinkPHP6 入门到电商实战》

Detailed explanation of RAID disk array
随机推荐
Zhang Xing's .NET IoT Getting Started Guide: (8) GPS-based NTP Time Synchronization Server
如何推进质量内建?如何设置质量门禁?
Biotin-HPDP(129179-83-5),一个巯基反应性的生物素化试剂
通俗经济学:有价星球
SQL注入 基础学习
HUD前装增速大幅下滑?市场格局分化/新玩家陆续入场
mysql operations, constraints, indexes
falco 【1】规则
151. Reverse words in string - double pointer method
不要小看一个Redis~ 从头到尾全是精华,阿里Redis速成笔记太香了
C语言中的三大自建类型
【StoneDB子查询优化】subquery子查询-优化exists场景的join查询优化器的处理-100GB数据量测试
27.移除元素-双指针法
图床软件要收费,算了我自己写一个开源免费的。
C#实现单例模式和实现思路
中信证券怎么开户?开户安全吗?
大屏可视化工具腾讯云图
【代码解读】超详细,YOLOV5之build_targets函数解读。
解决ping: www.baidu.com: Name or service not known
第02篇:分布式负载均衡