当前位置: 首页 > 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.huolong8.cn/news/465839/

相关文章:

  • 网站模板库 下载软文范例100字
  • 公司建站模版网站建设 北京
  • 商务网站推广目标有哪些在线设计闪字图片
  • 微信兼职网站开发博客导入wordpress
  • 水产公司网站源码wordpress防恶意注册
  • 外贸做企业什么网站泉州网站建设网站建设
  • .net网站开发实站商业网站的特点
  • 免费网站空间可上传网站代做财务报表分析网站
  • 电视台网站策划书网站制作软件都是什么软件
  • 竹子建站免费版展板排版设计布局
  • 939网站建设wordpress图片服务器配置
  • 网站建设电话销售技巧和话术建站公司的工作流程
  • 如何做推广麦当劳的网站公众号开发技术风险
  • 网站推广优化方案企业信息平台网站官网
  • 电子商务网站建设教学大纲系统软件有哪些?
  • 做海报哪个网站的素材多百度推广产品
  • 信息服务类网站建设方案如何创建网站教程视频
  • 建网站不花钱免费广西人社app登录不了
  • 陕西华伟建设有限公司网站wordpress英文版改成中文字体
  • 网站二级菜单模板wordpress 系统安装
  • 怎么建立一个自己的网站如何学网络推广
  • 华为的网站建设东丽网站建设公司
  • 怎么建设一个简单的网站wordpress apache伪静态
  • 网站后台设置网站视频解析
  • 钉钉如何做自己的网站红旗渠建设集团有限公司网站
  • 做外贸找客户的网站php高性能网站建设
  • 作品集的个人网站怎么做微商城网站建设报价
  • 杨凌企业网站建设购物网站怎么做优化
  • 国内优秀设计网站推荐如何查看网站是否被k
  • 网站开发模板教程网站建设发文章几点发比较合适