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

南昌网站建设公司行情关闭wordpress报错

南昌网站建设公司行情,关闭wordpress报错,仿阿里巴巴行业门户贸易网站模板,通辽建设工程网站elasticsearch-dump基本使用 该工具基于第三方Elasticdump工具来实现,仓库地址:https://github.com/elasticsearch-dump/elasticsearch-dump/tree/master,用于更加快捷方便的将Elasticsearch不同集群的数据进行索引备份和还原。 一、安装 …

elasticsearch-dump基本使用

该工具基于第三方Elasticdump工具来实现,仓库地址:https://github.com/elasticsearch-dump/elasticsearch-dump/tree/master,用于更加快捷方便的将Elasticsearch不同集群的数据进行索引备份和还原。

一、安装

1、通过node安装

node.js版本需大于v10.0.0

这里我就只是简单的使其临时生效,永久生效请自行写入具体的profile文件。

[root@localhost opt]# wget https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xz
[root@localhost opt]# tar xvf  node-v12.18.3-linux-x64.tar.xzexport 
[root@localhost opt]# PATH=$PATH:/root/node-v12.22.12-linux-x64/bin/
[root@localhost opt]# npm -v
6.14.6
[root@localhost opt]# node -v
v12.18.3

2、通过docker安装

这种比较方便

原本作者放出的镜像:

docker pull elasticdump/elasticsearch-dump

e.g:

docker run --rm -ti -v /data:/tmp elasticdump/elasticsearch-dump \
--input=http://production.es.com:9200/my_index \
--output=/tmp/my_index_mapping.json \
--type=data

该镜像只能使用elasticdump对单个具体索引进行备份,局限性较大。

我在作者镜像的基础上增加了使用multielasticdump对多个索引进行整体备份/恢复 (镜像基于node:18-alpine,仅增加命令选择,无其他任何变更,可放心使用。)

docker pull zhy94666/elasticsearchdump:latest

e.g:

# 多索引备份
docker run -it --rm -v ./es_bak:/opt/es_bak zhy94666/elasticsearchdump more \
--direction=dump \
--match='*' \
--input=http://*****:9200 \
--output=/opt/es_bak
# 单索引备份
docker run --rm -ti -v /data:/tmp zhy94666/elasticsearchdump one \
--input=http://production.es.com:9200/my_index \
--output=/tmp/my_index_mapping.json \
--type=data

二、基本使用

elasticdump

备份单个索引

这个命令将会将索引INDEX的数据导出到指定路径下的INDEX.json文件。

elasticdump \--input=http://localhost:9200/INDEX \--output=/path/to/output/INDEX.json \--type=data
修改速率(默认100条每秒)
elasticdump \--input=http://localhost:9200/INDEX \--output=/path/to/output/INDEX.json \--type=data \--limit 1000
还原单个索引

这将会将INDEX.json文件中的数据导入到Elasticsearch中的指定索引。

elasticdump \--input=/path/to/output/INDEX.json \--output=http://localhost:9200/INDEX \--type=data \--limit 10000
备份/恢复至/从S3中

备份

elasticdump \--s3AccessKeyId "${access_key_id}" \--s3SecretAccessKey "${access_key_secret}" \--input=http://production.es.com:9200/my_index \--output "s3://${bucket_name}/${file_name}.json"

恢复

elasticdump \--s3AccessKeyId "${access_key_id}" \--s3SecretAccessKey "${access_key_secret}" \--input "s3://${bucket_name}/${file_name}.json" \--output=http://production.es.com:9200/my_index
修改备份文件大小
elasticdump \--input=http://localhost:9200/INDEX \--output=/path/to/output/INDEX.json \--type=data \--fileSize 10mb
仅备份mapping映射结构(–type参数,重要!)
elasticdump \--input=http://localhost:9200/INDEX \--output=/path/to/output/INDEX.json \--type=data (该参数可选default: data, options: [index, settings, analyzer, data, mapping, policy, alias, template, component_template, index_template])

multielasticdump

可选参数
  • match: '^.*$'通配符匹配需要备份/恢复的索引
  • order: 'asc'排序,可选:asc / desc
  • input: null输入源,地址、备份目录等等
  • output: null输出地址,地址、备份目录等等
  • timeout: null超时时间
  • limit: 100速率
  • offset: 0偏移量?
  • size: -1
  • direction: dump备份时,–direction 为 dump(默认值),则 --input 必须是 Elasticsearch 服务器的 URL,–output 必须是一个目录。每个匹配的索引将生成数据、映射和分析器文件。
    恢复时,–direction 应设为 load,–input 必须是转储目录,–output 必须是 Elasticsearch 服务器的 URL。
  • ignoreType: `` dump或load时忽略的类型,可选:data,mapping,analyzer,alias,settings,template
  • includeType: `` dump或load时允许的类型,可选:data,mapping,analyzer,alias,settings,template
  • prefix: ''' 允许为索引添加前缀,e.g:${index}-backup-2018-03-13
  • suffix: '' 允许为正在创建的索引添加后缀,e.g:es6-${index}

三、简单范例

多索引备份

multielasticdump \ --direction=dump \ --match='r*' \ --input=http://172.16.0.79:9200 \ --output=./es_bak

多索引还原

multielasticdump \ --direction=load \ --match='^.*$' \ --input=/root/es_bak \ --includeType='data' \ --output=http://elastic:123456@172.18.0.25:9200 \ --limit=2000

http://www.yayakq.cn/news/649941/

相关文章:

  • 做哪些网站比较好山儿网站建设公司
  • 便宜点的网站建设软件开发文档总结
  • 淘宝做网站给了钱网站列表怎么做
  • 网上提交报名表系统的网站建设网站建设 域名 服务器
  • 岳阳网站建设团队网站常用参数
  • 苏州做网站公司前端如何兼职做网站
  • 可信网站是否有规定必须做工作手机
  • 建设摩托车官方网站js 插件html转换wordpress
  • 主流门户网站有哪些电脑培训网上课程
  • 网站建设的频道是什么意思纯flash网站
  • 深圳 做公司网站温州网吧什么时候恢复营业
  • 价值30万的网站建设家电维修 做网站还是搞公众号
  • 有人做几个蝎子养殖门户网站如何在微信公众号添加wordpress
  • 国外公司网站模板宜宾移动网站建设
  • 外包做网站不满意小辣椒昆明网站开发
  • 模板网站建设公司网站颜色
  • 上海市住房和城乡建设部网站网站源码免费资源网
  • 网站 改版百度seo如何快速排名
  • 网站开发到上线中交通力建设股份有限公司网站
  • 河南做网站优化wordpress 屏蔽国内ip
  • 阿里云linux服务器搭建多个网站建设银行黑龙江省分行官方网站
  • 学院网站设计案例wordpress的字体禁用
  • 南宁网站设计方案网站什么时候做解析
  • 苏州信网网站建设技术有限公司作风建设方面的网站
  • 印记室内设计网站温州建设网站制作
  • 华为公司网站建设目标地方志网站建设自查报告
  • 企业注册信息查询网站自己做网站哪种好做
  • 网站建设国内外现状wordpress 虎嗅2016
  • 网站建设 体会水果电子商务网站建设规划书
  • 大学网站建设策划书网站关键词没有指数