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

做凉菜的网站wordpress怎么缩短标题

做凉菜的网站,wordpress怎么缩短标题,在什么网站下载wordpress,海南四定网站开发Elasticsearch数据备份与恢复 前提 # 注意#xff1a; 1.在进行本地备份时使用--type需要备份索引和数据#xff08;mapping,data#xff09; 2.在将数据备份到另外一台ES节点时需要比本地备份多备份一种数据类型#xff08;analyzer,mapping,data,template#xff09; … Elasticsearch数据备份与恢复 前提 # 注意 1.在进行本地备份时使用--type需要备份索引和数据mapping,data 2.在将数据备份到另外一台ES节点时需要比本地备份多备份一种数据类型analyzer,mapping,data,template 一.本地备份与恢复 # 前提 · 必须要有Node环境和npm软件nodejsnpm 1.:下载包 wget https://nodejs.org/dist/v14.17.1/node-v14.17.1-linux-x64.tar.xz2.:安装包如果本身有node包但是不是新版本建议卸载重装 xz -d node-v14.17.1-linux-x64.tar.xz tar -xvf node-v14.17.1-linux-x64.tar echo export NODE_HOME/home/workspaces/node-v14.17.1-linux-x64 export PATH$PATH:$NODE_HOME/bin export NODE_PATH$NODE_HOME/lib/node_modules /etc/profile source /etc/profile3.:验证安装是否成功 node -v4.:设置淘宝镜像 npm config set registry http://registry.npm.taobao.org5.安装npm只需要在一个节点安装即可如果前端还有nginx做反向代理可以每个节点都装 [rootelkstack01 ~]# yum install -y npm6.进入下载head插件代码目录 [rootelkstack01 src]# cd /usr/local/7.从GitHub上克隆代码到本地或者直接从找es-head的包 [rootelkstack01 local]# git clone git://github.com/mobz/elasticsearch-head.git8.克隆完成后进入elasticsearch插件目录 [rootelkstack01 local]# cd elasticsearch-head/9.清除缓存 [rootelkstack01 elasticsearch-head]# npm cache clean -f #使用npm安装n模块不同的项目js脚本所需的node版本可能不同所以就需要node版本管理工具10.安装elasticdump [rootdb04 ~]# npm install elasticdump -g11.本地目录备份## 第一次进行的是索引的备份 ## 第二次进行的是数据的备份 [rootdb04 bin]# ./elasticdump --inputhttp://10.0.0.54:9200/student/user --output/tmp/student_mapping.json --typemapping Wed, 12 Aug 2020 07:41:59 GMT | starting dump Wed, 12 Aug 2020 07:41:59 GMT | got 1 objects from source elasticsearch (offset: 0) Wed, 12 Aug 2020 07:41:59 GMT | sent 1 objects to destination file, wrote 1 Wed, 12 Aug 2020 07:41:59 GMT | got 0 objects from source elasticsearch (offset: 1) Wed, 12 Aug 2020 07:41:59 GMT | Total Writes: 1 Wed, 12 Aug 2020 07:41:59 GMT | dump complete [rootdb04 bin]# ./elasticdump --inputhttp://10.0.0.54:9200/student/user --output/tmp/student_data.json --typedata Wed, 12 Aug 2020 07:42:21 GMT | starting dump Wed, 12 Aug 2020 07:42:21 GMT | got 8 objects from source elasticsearch (offset: 0) Wed, 12 Aug 2020 07:42:21 GMT | sent 8 objects to destination file, wrote 8 Wed, 12 Aug 2020 07:42:21 GMT | got 0 objects from source elasticsearch (offset: 8) Wed, 12 Aug 2020 07:42:21 GMT | Total Writes: 8 Wed, 12 Aug 2020 07:42:21 GMT | dump complete##备份之后用Elasticsearch Head插件模拟数据丢失误删除student索引和数据并用elasticdump恢复[rootdb04 bin]# ./elasticdump --outputhttp://10.0.0.54:9200/student --input/tmp/student_mapping.json --typemapping Wed, 12 Aug 2020 07:46:21 GMT | starting dump Wed, 12 Aug 2020 07:46:21 GMT | got 1 objects from source file (offset: 0) Wed, 12 Aug 2020 07:46:21 GMT | sent 1 objects to destination elasticsearch, wrote 1 Wed, 12 Aug 2020 07:46:21 GMT | got 0 objects from source file (offset: 1) Wed, 12 Aug 2020 07:46:21 GMT | Total Writes: 1 Wed, 12 Aug 2020 07:46:21 GMT | dump complete [rootdb04 bin]# ./elasticdump --outputhttp://10.0.0.54:9200/student --input/tmp/student_data.json --typedata Wed, 12 Aug 2020 07:46:40 GMT | starting dump Wed, 12 Aug 2020 07:46:40 GMT | got 8 objects from source file (offset: 0) Wed, 12 Aug 2020 07:46:40 GMT | sent 8 objects to destination elasticsearch, wrote 8 Wed, 12 Aug 2020 07:46:40 GMT | got 0 objects from source file (offset: 8) Wed, 12 Aug 2020 07:46:40 GMT | Total Writes: 8 Wed, 12 Aug 2020 07:46:40 GMT | dump complete # 根据索引名和类型进行备份 #备份成功。数据恢复成功 二.备份到另一台ES节点如果是同一集群的节点索引不能重名 # 备份到另一台ES节点同一集群索引不能重名 [rootdb04 bin]# ./elasticdump --inputhttp://10.0.0.54:9200/student --outputhttp://10.0.0.55:9200/students --typeanalyzer Wed, 12 Aug 2020 08:14:00 GMT | starting dump Wed, 12 Aug 2020 08:14:00 GMT | got 1 objects from source elasticsearch (offset: 0) Wed, 12 Aug 2020 08:14:01 GMT | sent 1 objects to destination elasticsearch, wrote 1 Wed, 12 Aug 2020 08:14:01 GMT | got 0 objects from source elasticsearch (offset: 1) Wed, 12 Aug 2020 08:14:01 GMT | Total Writes: 1 Wed, 12 Aug 2020 08:14:01 GMT | dump complete [rootdb04 bin]# ./elasticdump --inputhttp://10.0.0.54:9200/student --outputhttp://10.0.0.55:9200/students --typemapping Wed, 12 Aug 2020 08:14:10 GMT | starting dump Wed, 12 Aug 2020 08:14:10 GMT | got 1 objects from source elasticsearch (offset: 0) Wed, 12 Aug 2020 08:14:10 GMT | sent 1 objects to destination elasticsearch, wrote 1 Wed, 12 Aug 2020 08:14:10 GMT | got 0 objects from source elasticsearch (offset: 1) Wed, 12 Aug 2020 08:14:10 GMT | Total Writes: 1 Wed, 12 Aug 2020 08:14:10 GMT | dump complete [rootdb04 bin]# ./elasticdump --inputhttp://10.0.0.54:9200/student --outputhttp://10.0.0.55:9200/students --typedata Wed, 12 Aug 2020 08:14:15 GMT | starting dump Wed, 12 Aug 2020 08:14:15 GMT | got 8 objects from source elasticsearch (offset: 0) Wed, 12 Aug 2020 08:14:15 GMT | sent 8 objects to destination elasticsearch, wrote 8 Wed, 12 Aug 2020 08:14:15 GMT | got 0 objects from source elasticsearch (offset: 8) Wed, 12 Aug 2020 08:14:15 GMT | Total Writes: 8 Wed, 12 Aug 2020 08:14:15 GMT | dump complete [rootdb04 bin]#elasticdump --inputhttp://10.0.0.54:9200/student --outputhttp://100.10.0.55:9200/students --typetemplate 三.本地备份与恢复脚本 # 1.本地备份脚本 [rootdb04 ~]# vim output_Es.sh #!/bin/bash read -p 要备份的机器是${1} #要导出的索引名 index_name studentfor index in echo $index_name doecho start input index ${index}elasticdump --inputhttp://${1}:9200/${index} --output/data/${index}_alias.json --typealias /dev/nullelasticdump --inputhttp://${1}:9200/${index} --output/data/${index}_analyzer.json --typeanalyzer /dev/nullelasticdump --inputhttp://${1}:9200/${index} --output/data/${index}_data.json --typedata /dev/nullelasticdump --inputhttp://${1}:9200/${index} --output/data/${index}_alias.json --typealias /dev/nullelasticdump --inputhttp://${1}:9200/${index} --output/data/${index}_template.json --typetemplate /dev/null done# 2.恢复脚本 [rootdb04 ~]# vim input_Es.sh #!/bin/bash read -p 要导入的机器是${1} #要导入的索引名 index_name studentfor index in echo $index_name doecho start input index ${index}elasticdump --input/data/${index}_alias.json --outputhttp://${1}:9200/${index} --typealias /dev/nullelasticdump --input/data/${index}_analyzer.json --outputhttp://${1}:9200/${index} --typeanalyzer /dev/nullelasticdump --input/data/${index}_data.json --outputhttp://${1}:9200/${index} --typedata /dev/nullelasticdump --input/data/${index}_template.json --outputhttp://${1}:9200/${index} --typetemplate /dev/null done 测试脚本 # 0.配置环境变量 [rootdb04 ~]# vim /etc/profile.d/elasticdump.sh export PATH/root/node-v10.13.0-linux-x64/lib/node_modules/elasticdump/bin:$PATH [rootdb04 ~]# source /etc/profile# 1.创建备份目录 [rootdb04 ~]# mkdir /data# 2.执行备份脚本 [rootdb04 ~]# sh output_Es.sh 要备份的机器是10.0.0.54 start input index student# 3.查看备份目录 [rootdb04 ~]# ll /data/ total 16 -rw-r--r-- 1 root root 5 Aug 12 16:59 student_alias.json -rw-r--r-- 1 root root 101 Aug 12 16:59 student_analyzer.json -rw-r--r-- 1 root root 1284 Aug 12 16:59 student_data.json -rw-r--r-- 1 root root 5 Aug 12 16:59 student_template.json # 模拟误删除操作 # 执行恢复脚本 [rootdb04 ~]# sh input_Es.sh 要导入的机器是10.0.0.54 start input index student## 数据恢复
http://www.hkea.cn/news/14276046/

相关文章:

  • 电子商务网站规划与建设试题网站建设研究背景
  • 网站开发与设计武威 网站建设
  • 公司网站制作的费用申请做爰视频网站在线看
  • 柳江企业网站建设价格软件技术属于什么学类
  • 男女做爰视频网站在线视频如何做网站免费搭桥链接
  • 做网站 绍兴展览公司网站建设
  • 网站修改图片怎么做龙岩相亲网
  • 湖南星大建设集团有限公司网站网店营销
  • 网站 建设 现状分析新冠怎么突然不见了
  • 做网站公司上班违法吗网站设计与程序方向
  • 西安商城网站建设网站专业术语中seo意思是
  • 成都电商网站开发网络做网站如何盈利
  • 制作企业网站页面多少钱wordpress js 调用图片
  • 网站开发技术应用领域thinkphp 做网站如何
  • 游戏网站建设论文简单漂亮的博客php网站源码
  • 医院网站建设安全协议哪个建站软件比较好带论坛
  • 怎么对网站做seo优化二维码生成器加logo
  • 没有固定ip做网站n怎样建立自己的网站
  • 怎么攻击网站吗旅游最新政策
  • 本人找做钢筋笼的活网站wordpress认证机制
  • 未成年人思想道德建设网站今天郑州最新通告
  • 做网站常用什么软件dedecms中英文网站 模板
  • 建设小型网站系统开题报告用帝国做的网站
  • 河北省城乡与住房建设厅网站牛商网朱依静
  • 网站开发大揭秘wordpress关闭缓存
  • 网站建设兼职合同模板seo推广软件费用
  • 买了云服务器怎么做网站普陀做网站
  • 水墨风格网站欣赏做宠物服务的相关网站
  • 兴县网站建设有没有网站建设的教程
  • 网页网站开发平台建筑英才网官方