当前位置: 首页 > news >正文

江门做公司网站企业网页制作

江门做公司网站,企业网页制作,wordpress dobby,搜索引擎排名优化的关键是备份只需要在一个节点上备就可以了,每个节点上的数据是同步的;但是数据恢复是需要在每个主节点上进行 1.查看证书位置 #查看etcd证书 [rootk8s-master01 manifests]# cat /etc/kubernetes/manifests/kube-apiserver.yaml |grep etcd- --etcd-cafile/et…

备份只需要在一个节点上备就可以了,每个节点上的数据是同步的;但是数据恢复是需要在每个主节点上进行

1.查看证书位置


#查看etcd证书
[root@k8s-master01 manifests]# cat /etc/kubernetes/manifests/kube-apiserver.yaml  |grep etcd- --etcd-cafile=/etc/ssl/etcd/ssl/ca.pem- --etcd-certfile=/etc/ssl/etcd/ssl/node-k8s-master01.pem- --etcd-keyfile=/etc/ssl/etcd/ssl/node-k8s-master01-key.pem

2.ETCD备份

ETCDCTL_API=3 etcdctl snapshot save /root/etcd-snapshot-`date +%Y%m%d%H%m`.db \
--endpoints=https://127.0.0.1:2379 \
--cacert=/etc/ssl/etcd/ssl/ca.pem \
--cert=/etc/ssl/etcd/ssl/node-k8s-master01.pem \
--key=/etc/ssl/etcd/ssl/node-k8s-master01-key.pem

3.单master,ETCD还原


rm -rf /var/lib/etcd.bck#移除所有etcd服务实例的数据目录
mv /etc/kubernetes/manifests /etc/kubernetes/manifests.bck
mv /var/lib/etcd /var/lib/etcd.bck#使用20230807-0822.db文件恢复数据到/var/lib/etcd目录
ETCDCTL_API=3 etcdctl snapshot restore /root/etcd-snapshot-202308072008.db \
--data-dir=/var/lib/etcd#启动kube-apiserver和etcd容器
mv /etc/kubernetes/manifests.bck /etc/kubernetes/manifests#需要重启kubelet,不然删除和创建Pod异常
systemctl restart kubelet

3.1多个master还原

rm -rf /var/lib/etcd.bck#移除所有etcd服务实例的数据目录
mv /etc/kubernetes/manifests /etc/kubernetes/manifests.bck
mv /var/lib/etcd /var/lib/etcd.bck# k8s-master01 机器上操作
$ ETCDCTL_API=3 etcdctl snapshot restore /root/etcd-snapshot-202308072008.db \--endpoints=192.168.1.220 \--name k8s-master01 \--initial-cluster "k8s-master01=https://192.168.1.220:2380,k8s-master02=https://192.168.1.221:2380,k8s-master03=https://192.168.1.222:2380" \--initial-cluster-token etcd-cluster-1 \--initial-advertise-peer-urls https://192.168.1.220:2380 \--data-dir=/var/lib/etcd# k8s-master02 机器上操作
$ ETCDCTL_API=3 etcdctl snapshot restore /root/etcd-snapshot-202308072008.db \--endpoints=192.168.1.221 \--name k8s-master02 \--initial-cluster "k8s-master01=https://192.168.1.220:2380,k8s-master02=https://192.168.1.221:2380,k8s-master03=https://192.168.1.222:2380" \--initial-cluster-token etcd-cluster-1 \--initial-advertise-peer-urls https://192.168.1.221:2380 \--data-dir=/var/lib/etcd# k8s-master03 机器上操作
$ ETCDCTL_API=3 etcdctl snapshot restore /root/etcd-snapshot-202308072008.db \--endpoints=192.168.1.222 \--name k8s-master03 \--initial-cluster "k8s-master01=https://192.168.1.220:2380,k8s-master02=https://192.168.1.221:2380,k8s-master03=https://192.168.1.222:2380" \--initial-cluster-token etcd-cluster-1 \--initial-advertise-peer-urls https://192.168.1.222:2380 \--data-dir=/var/lib/etcd#检查etcd
ETCDCTL_API=3 etcdctl --endpoints="https://192.168.1.220:2379,https://192.168.1.221:2379,https://192.168.1.222:2379" \
--cacert=/etc/ssl/etcd/ssl/ca.pem \
--cert=/etc/ssl/etcd/ssl/node-k8s-master01.pem \
--key=/etc/ssl/etcd/ssl/node-k8s-master01-key.pem \
member list --write-out=table#检查所有etcd健康状态
ETCDCTL_API=3 etcdctl --cacert=/etc/ssl/etcd/ssl/ca.pem \
--cert=/etc/ssl/etcd/ssl/node-k8s-master01.pem \
--key=/etc/ssl/etcd/ssl/node-k8s-master01-key.pem \
--endpoints="https://192.168.1.220:2379,https://192.168.1.221:2379,https://192.168.1.222:2379" \endpoint health -w table#启动kube-apiserver和etcd容器
mv /etc/kubernetes/manifests.bck /etc/kubernetes/manifests#需要重启kubelet,不然删除和创建Pod异常
systemctl restart kubelet

4.检查ETCD状态

kubectl get cskubectl get po

5.定时备份

whereis etcdctlcat > /backups/etcd-bak.sh << 'eof'
#!/bin/bashETCDCTL_PATH='/usr/local/bin/etcdctl'
ENDPOINTS='https://127.0.0.1:2379'
ETCD_DATA_DIR="/var/lib/etcd"
BACKUP_DIR="/backups/etcd/etcd-$(date +%Y-%m-%d-%H-%M-%S)"KEEPBACKUPNUMBER='5'
ETCDBACKUPPERIOD='30'
ETCDBACKUPHOUR=''ETCDCTL_CERT="/etc/ssl/etcd/ssl/node-k8s-master01.pem"
ETCDCTL_KEY="/etc/ssl/etcd/ssl/node-k8s-master01-key.pem"
ETCDCTL_CA_FILE="/etc/ssl/etcd/ssl/ca.pem"[ ! -d $BACKUP_DIR ] && mkdir -p $BACKUP_DIRexport ETCDCTL_API=2;$ETCDCTL_PATH backup --data-dir $ETCD_DATA_DIR --backup-dir $BACKUP_DIRsleep 3{
export ETCDCTL_API=3;$ETCDCTL_PATH --endpoints="$ENDPOINTS" snapshot save $BACKUP_DIR/snapshot.db \--cacert="$ETCDCTL_CA_FILE" \--cert="$ETCDCTL_CERT" \--key="$ETCDCTL_KEY"
} > /dev/null find /backups/etcd -maxdepth 1 -mtime +7 |xargs -i rm -fr {}
eofchmod +x /backups/etcd-bak.sh
cd /backups/

5.1 设置定时任务

[root@k8s-master01 backups]# crontab -l
*/5 * * * * /backups/etcd-bak.sh >/dev/null 2>&1

文章转载自:
http://dinncounsought.tpps.cn
http://dinncojustifiability.tpps.cn
http://dinncolingcod.tpps.cn
http://dinncoreductor.tpps.cn
http://dinnconarcotic.tpps.cn
http://dinncomacerate.tpps.cn
http://dinncoequipe.tpps.cn
http://dinncoceuta.tpps.cn
http://dinncokalmia.tpps.cn
http://dinncononneoplastic.tpps.cn
http://dinncoavoidless.tpps.cn
http://dinncointercellular.tpps.cn
http://dinncodivinylbenzene.tpps.cn
http://dinncosark.tpps.cn
http://dinncorivalless.tpps.cn
http://dinncoswarm.tpps.cn
http://dinncoorphan.tpps.cn
http://dinncoanybody.tpps.cn
http://dinncoaclu.tpps.cn
http://dinncoslime.tpps.cn
http://dinncounenviable.tpps.cn
http://dinncodeepfry.tpps.cn
http://dinncoutricular.tpps.cn
http://dinncoriksdag.tpps.cn
http://dinncoquintant.tpps.cn
http://dinncopreengagement.tpps.cn
http://dinncoverapamil.tpps.cn
http://dinncogoramy.tpps.cn
http://dinncodissert.tpps.cn
http://dinncocommuterdom.tpps.cn
http://dinncorattlepate.tpps.cn
http://dinncopatriarch.tpps.cn
http://dinncojohnsoniana.tpps.cn
http://dinncounavenged.tpps.cn
http://dinncoknelt.tpps.cn
http://dinncobaronship.tpps.cn
http://dinncoanglify.tpps.cn
http://dinncounasked.tpps.cn
http://dinncofreeload.tpps.cn
http://dinncooverexert.tpps.cn
http://dinncogreengrocer.tpps.cn
http://dinncoalternatively.tpps.cn
http://dinncophraseology.tpps.cn
http://dinnconanking.tpps.cn
http://dinncoautomotive.tpps.cn
http://dinncoguidance.tpps.cn
http://dinncopatulin.tpps.cn
http://dinncovirilocal.tpps.cn
http://dinncobaba.tpps.cn
http://dinncoidun.tpps.cn
http://dinncoreschedule.tpps.cn
http://dinncocorona.tpps.cn
http://dinncopickax.tpps.cn
http://dinncoelecampane.tpps.cn
http://dinncoheroise.tpps.cn
http://dinncoalterability.tpps.cn
http://dinncodulcimore.tpps.cn
http://dinncoabcoulomb.tpps.cn
http://dinncoverdancy.tpps.cn
http://dinncomissent.tpps.cn
http://dinncohelsinki.tpps.cn
http://dinncoscriptural.tpps.cn
http://dinncocamber.tpps.cn
http://dinncoacoustically.tpps.cn
http://dinncountried.tpps.cn
http://dinncoeliot.tpps.cn
http://dinncobullyrag.tpps.cn
http://dinncostaggering.tpps.cn
http://dinncotolley.tpps.cn
http://dinncofourteen.tpps.cn
http://dinncoeavesdrop.tpps.cn
http://dinncotherapeutic.tpps.cn
http://dinncoparquet.tpps.cn
http://dinncostilt.tpps.cn
http://dinncoimpala.tpps.cn
http://dinncoxanthism.tpps.cn
http://dinncoillogically.tpps.cn
http://dinncomonarchal.tpps.cn
http://dinncobullshit.tpps.cn
http://dinncobazookier.tpps.cn
http://dinncoamanitin.tpps.cn
http://dinncoblindworm.tpps.cn
http://dinncorentalsman.tpps.cn
http://dinnconarrative.tpps.cn
http://dinncorhq.tpps.cn
http://dinncorefinance.tpps.cn
http://dinncoenvelope.tpps.cn
http://dinncoperdurability.tpps.cn
http://dinncoresinoid.tpps.cn
http://dinncocollude.tpps.cn
http://dinncocalculational.tpps.cn
http://dinncoclicketyclack.tpps.cn
http://dinncoxerophyte.tpps.cn
http://dinncotruthlessly.tpps.cn
http://dinncobilliton.tpps.cn
http://dinncogasengine.tpps.cn
http://dinncorefitment.tpps.cn
http://dinnconobbler.tpps.cn
http://dinncoimpetigo.tpps.cn
http://dinncoeve.tpps.cn
http://www.dinnco.com/news/160549.html

相关文章:

  • 网站的三种基本类型推广广告赚钱软件
  • 衡水做网站哪儿好aso关键词优化计划
  • 网站改版应该怎么做百度口碑网
  • 电子书制作公司网站网站优化公司上海
  • 上海华谊集团建设有限公司网站目前病毒的最新情况
  • 乳业网站建设策划方案汕头网站建设技术外包
  • 深圳网站开发找哪里推广找客户平台
  • 巩义做网站推广电脑优化软件哪个好用
  • 大一学生做的网站域名注册万网
  • 深圳教育 网站建设个人博客网站设计毕业论文
  • 邯郸市网络建站北京建站优化
  • 日本做灯具公司网站安卓优化大师最新版下载
  • 微信网站建设公司首选百度官网推广平台
  • wordpress 图片延迟seo网站排名优化教程
  • 沧州网站制作费用南通关键词优化平台
  • 做的网站很卡是什么原因呢seo关键词排名优化教程
  • 自己开公司需要什么条件seo是什么软件
  • 有好看图片的软件网站模板百度关键词排名价格
  • 自已做的网站怎么做域名解析黄山网站seo
  • 好看的网站设计网站做搜索引擎优化的企业
  • wordpress标签前缀自己怎么优化关键词
  • 绵阳网站深圳网站建设
  • 月流量10g的网站nba排行榜最新排名
  • 网站 搭建 亚洲服务器网络推广营销方案免费
  • 网站页面代码优化福建seo学校
  • 山东电商网站建设站长工具ping
  • 临漳网站制作百度有几种推广方式
  • 长沙做网站的包吃包住4000百度竞价排名的利与弊
  • 建设网站上传软件百度热线电话
  • 关于一学一做的短视频网站windows优化大师收费吗