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

做网站和做免费推广网站的区别创意设计活动加计扣除

做网站和做免费推广网站的区别,创意设计活动加计扣除,网站专题策划案例,网站开发答辩知识点ElasticSearch 数据迁移工具elasticdump Elasticdump 是一个用于导入和导出 Elasticsearch 数据的命令行工具。它提供了一种方便的方式来在不同的 Elasticsearch 实例之间传输数据#xff0c;或者进行数据备份和恢复。 使用 Elasticdump#xff0c;你可以将 Elasticsearch …ElasticSearch 数据迁移工具elasticdump Elasticdump 是一个用于导入和导出 Elasticsearch 数据的命令行工具。它提供了一种方便的方式来在不同的 Elasticsearch 实例之间传输数据或者进行数据备份和恢复。 使用 Elasticdump你可以将 Elasticsearch 索引中的数据导出为 JSON 文件或者将 JSON 文件中的数据导入到 Elasticsearch 索引中。它支持各种选项和过滤器用于指定源和目标包括索引模式、文档类型、查询过滤器等等。 主要特征包括 支持在Elasticsearch实例或者集群之间传输和备份数据。可以将数据从一个集群复制到另一个集群。支持不同格式的数据传输,包括JSON、NDJSON、CSV、备份文件等。可以通过命令行或者程序化的方式使用。命令行方式提供了便捷的操作接口。支持增量式同步,只复制目标集群中不存在的文档。支持各种认证方式连接Elasticsearch,如basic auth、Amazon IAM等。支持多线程操作,可以加快数据迁移的速度。开源免费,代码托管在GitHub上。 一、安装node 首先获取安装包 wget https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz tar axf node-v16.14.0-linux-x64.tar.xz -C /usr/local/ mv /usr/local/node-v16.14.0-linux-x64 /usr/local/node然后配置环境变量 vim /etc/profile export NODE_HOME/usr/local/node export PATH$NODE_HOME/bin:$PATH接下来刷新环境变量然后测试一下安装是否完成 source /etc/profilenode -vnpm -v如果是mac 的话可以使用brew 安装 brew install node16二、在线安装elasticdump 执行下面的命令安装 npm install elasticdump -g使用下面的命令查看安装目录 npm root -g我的位置在这里/opt/homebrew/lib/node_modules 三、离装elasticdump 这里的原理是将node安装包和elasticdump安装报复制到需要离线安装的服务器。 获取node 的离线安装包进行安装即可参考第一步获取elasticdump的安装包安装所以我们首选需要一个打包工具 npm install -g npm-pack-all然后我们切换到上面elasticdump的安装路打包elasticdump会在当前目录生成elasticdump-6.103.0.tgz 这样一个压缩包这就是我们离线安装需要的包 cd /opt/homebrew/lib/node_modules/elasticdump/ npm-pack-all到这里我们看到离线包已经生成好了接下来我们复制到我们之前已经安装好node 的机器上,执行下面的命令 npm install elasticdump-6.103.0.tgz后面为了方便使用我们可以配置一下elasticdump的环境变量 vim ~/.bashrc # 追加以下内容 #node export DUMP_HOME/opt/homebrew/lib/node_modules/elasticdump/ export PATH$DUMP_HOME/bin:$PATH # 刷新 source ~/.bashrc四、使用elasticdump 这里的使用主要分为两种一种是数据备份一种是数据迁移 备份主要指的是生成备份的数据文件在需要的时候进行还原数据迁移是指将原来索引里的数据迁移到新的索引 其实数据备份也能达到数据迁移的目的但是在两个环境的网络不通的时候我们只能使用数据备份 我们安装成功后在elasticdump的bin目录下其实有两个工具一个是elasticdump 另外一个是multielasticdump 数据迁移 迁移索引 elasticdump \--inputhttp://192.168.1.140:9200/source_index \--outputhttp://192.168.1.141:9200/target_index \--typemapping迁移数据 elasticdump \--inputhttp://192.168.1.140:9200/source_index \--outputhttp://192.168.1.141:9200/target_index \--typedata \--limit2000 # 每次操作的objects数量默认100数据量大的话可以调大加快迁移速度这个命令会将源 Elasticsearch 实例中的 “my_index” 索引的所有数据导出并保存到 “/path/to/output.json” 的 JSON 文件中。 --input指定输入的 Elasticsearch 实例和索引。可以是一个 URL也可以是本地 Elasticsearch 实例的路径。--output指定输出的文件路径数据将保存为一个 JSON 文件。--type指定要导出的数据类型通常为 “data” 表示文档数据。 你还可以使用其他选项来进一步控制导出过程如 --query, --size, --limit, --filter 等具体取决于你的需求。可以通过运行 elasticdump --help 命令来 数据备份 导出索引和数据 elasticdump \--inputhttp://192.168.1.140:9200/source_index \--output/data/source_index_mapping.json \--typemapping elasticdump \--inputhttp://192.168.1.140:9200/source_index \--output/data/source_index.json \--typedata \--limit2000导入索引和数据 elasticdump \--input/data/source_index_mapping.json \--outputhttp://192.168.1.141:9200/source_index \--typemapping elasticdump \--input/data/source_index.json \--outputhttp://192.168.1.141:9200/source_index \--typedata \--limit2000 其他用法 还有其他使用的细节例如压缩指定query 什么的我们可以参考下面的例子 # Copy an index from production to staging with analyzer and mapping: elasticdump \--inputhttp://production.es.com:9200/my_index \--outputhttp://staging.es.com:9200/my_index \--typeanalyzer elasticdump \--inputhttp://production.es.com:9200/my_index \--outputhttp://staging.es.com:9200/my_index \--typemapping elasticdump \--inputhttp://production.es.com:9200/my_index \--outputhttp://staging.es.com:9200/my_index \--typedata# Backup index data to a file: elasticdump \--inputhttp://production.es.com:9200/my_index \--output/data/my_index_mapping.json \--typemapping elasticdump \--inputhttp://production.es.com:9200/my_index \--output/data/my_index.json \--typedata# Backup and index to a gzip using stdout: elasticdump \--inputhttp://production.es.com:9200/my_index \--output$ \| gzip /data/my_index.json.gz# Backup the results of a query to a file elasticdump \--inputhttp://production.es.com:9200/my_index \--outputquery.json \--searchBody{\query\:{\term\:{\username\: \admin\}}}# Specify searchBody from a file elasticdump \--inputhttp://production.es.com:9200/my_index \--outputquery.json \--searchBody/data/searchbody.json # Copy a single shard data: elasticdump \--inputhttp://es.com:9200/api \--outputhttp://es.com:9200/api2 \--input-params{\preference\:\_shards:0\}# Backup aliases to a file elasticdump \--inputhttp://es.com:9200/index-name/alias-filter \--outputalias.json \--typealias# Import aliases into ES elasticdump \--input./alias.json \--outputhttp://es.com:9200 \--typealias# Backup templates to a file elasticdump \--inputhttp://es.com:9200/template-filter \--outputtemplates.json \--typetemplate# Import templates into ES elasticdump \--input./templates.json \--outputhttp://es.com:9200 \--typetemplate# Split files into multiple parts elasticdump \--inputhttp://production.es.com:9200/my_index \--output/data/my_index.json \--fileSize10mb# Import data from S3 into ES (using s3urls) elasticdump \--s3AccessKeyId ${access_key_id} \--s3SecretAccessKey ${access_key_secret} \--input s3://${bucket_name}/${file_name}.json \--outputhttp://production.es.com:9200/my_index# Export ES data to S3 (using s3urls) elasticdump \--s3AccessKeyId ${access_key_id} \--s3SecretAccessKey ${access_key_secret} \--inputhttp://production.es.com:9200/my_index \--output s3://${bucket_name}/${file_name}.json# Import data from MINIO (s3 compatible) into ES (using s3urls) elasticdump \--s3AccessKeyId ${access_key_id} \--s3SecretAccessKey ${access_key_secret} \--input s3://${bucket_name}/${file_name}.json \--outputhttp://production.es.com:9200/my_index--s3ForcePathStyle true--s3Endpoint https://production.minio.co# Export ES data to MINIO (s3 compatible) (using s3urls) elasticdump \--s3AccessKeyId ${access_key_id} \--s3SecretAccessKey ${access_key_secret} \--inputhttp://production.es.com:9200/my_index \--output s3://${bucket_name}/${file_name}.json--s3ForcePathStyle true--s3Endpoint https://production.minio.co# Import data from CSV file into ES (using csvurls) elasticdump \# csv:// prefix must be included to allow parsing of csv files# --input csv://${file_path}.csv \--input csv:///data/cars.csv--outputhttp://production.es.com:9200/my_index \--csvSkipRows 1 # used to skip parsed rows (this does not include the headers row)--csvDelimiter ; # default csvDelimiter is , 常用参数 --direction dump/load 导出/导入 --ignoreType 被忽略的类型data,mapping,analyzer,alias,settings,template --includeType 包含的类型data,mapping,analyzer,alias,settings,template --suffix 加前缀es6-${index} --prefix 加后缀${index}-backup-2018-03-13总结 elasticdump是ElasticSearch提供的一个工具我们主要可以用来完成 数据备份数据迁移 这一节我们主要介绍了elasticdump的安装和使用还有就是Elasticdump 是一个第三方工具不是官方的 Elasticsearch 产品。虽然它对某些用例很有帮助但在使用之前确保与你的 Elasticsearch 版本兼容并查阅工具的文档以了解任何特定的注意事项或限制。 总体来说,elasticdump是一个非常实用的数据迁移和备份工具。它可以帮助我们轻松地在不同Elasticsearch集群之间进行数据迁移,实现集群之间的无缝数据同步。
http://www.yutouwan.com/news/465839/

相关文章:

  • 深圳做网站公司有哪些公司苏州十大广告公司
  • 不用代码可以做网站设计吗品牌设计公司是做什么的
  • 沈阳做网站的地方做网站需要了解的知识
  • 网站群建设方案.docwordpress 搭建博客
  • 网站推广报价页面设计原则
  • 网上做调查问卷赚钱的网站微网站建设及微信推广方案ppt
  • 网站案例展示怎么做网站多域名怎么做
  • 如何做视频网站的广告推广山西省网站域名备案得多长时间
  • 淘宝做问卷的网站好wordpress 打车
  • 做网站推广方法seo关键词优化最多可以添加几个词
  • 建设信用卡登录中心网站怎样做网站跳转
  • 京东自营入驻流程及费用百度seo公司
  • 千岛湖建设集团有限公司网站门户网站的布局
  • 江门网站建设维护减压疗程wordpress
  • 网站建设专业的商家微信下单小程序怎么开通
  • 帮别人做高仿产品网站 违法么兰州优化定制
  • 做可以上传文件的网站中山h5网站建设
  • asp.net 获取网站域名wordpress 圆形头像
  • 苏州市吴中区住房和城乡建设局网站网络营销策划案ppt
  • 中国建设监理协会网站继续教育系统五金设备网站建设
  • 做电力项目信息的网站徐州网站建设公司哪个好
  • 金融网站建站昆明网站推广专员
  • php网站开发练手项目网站怎么产品做推广
  • 胃肠科医院网站建设网站建设三大部分
  • 建筑招工人在哪个网站比较好找友情链接的获取途径有哪些
  • 如何seo网站挣钱陈木胜老婆
  • c 怎么和网站做交互建设电商网站多少钱
  • 在线教育网站设计wordpress主题模板 教育
  • 山东省建设厅招标网站首页出色的网站设计
  • 芗城网站建设网站模板建站