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

网站优化比较好的公司网站制作商家入驻

网站优化比较好的公司,网站制作商家入驻,如何制作wordpress短代码6,网上房地产官网本文使用 elasticdump 做数据迁移#xff0c;支持在线和离线俩种方式#xff0c;适用于数据量比较小的情况。 1、Node 安装 由于elasticdump 依赖于 node#xff0c;首先需要安装下node。 1.1、 Linux 安装 $ wget https://nodejs.org/dist/v10.15.0/node-v10.15.0-linu… 本文使用 elasticdump 做数据迁移支持在线和离线俩种方式适用于数据量比较小的情况。 1、Node 安装 由于elasticdump 依赖于 node首先需要安装下node。 1.1、 Linux 安装 $ wget https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-x64.tar.xz $ tar -xf node-v10.15.0-linux-x64.tar.xz #配置相关的环境变量 $ vim /etc/profilePATH$PATH:/software/node-v10.15.0-linux-x64/bin $ source /etc/profile1.2、Windows安装 选择对应的windows版本一路下一步即可以下是64位的安装包标注 2、安装 elasticdump linux和windows基本相同建议全局安装下 #本地安装和全局安装的区别在于它是否自动给你设置环境变量其他的没有区别 # 本地安装 $ npm install elasticdump $ ./bin/elasticdump # 全局安装 $ npm install elasticdump -g $ elasticdump3、数据迁移 ES索引的迁移需要一个个的迁移并且分analyzer、mapping、data三部分。 备注 http://production.es.com:9200/my_index 为源索引 http://staging.es.com:9200/my_index 为目标索引 “” 为换行符一行可以不用写 如果es是有用户密码做为鉴权的则需要修改下URL # 注意 elasticdump 提供给了--httpAuthFile 参数来做认证 --httpAuthFile When using http auth provide credentials in ini file in formuserusernamepasswordpassword# 只需要写一个ini文件 文件中写入用户名和密码就可以了# 这里其实还有另外一个好的方法# 在--input参数和--output参数的的url中添加账号密码# 例如 elasticdump \--inputhttp://prod-username:prod-passowrdproduction.es.com:9200/my_index \--outputhttp://stage-username:stage-passwordstaging.es.com:9200/my_index \--typedata3.1、在线迁移 #拷贝analyzer分词 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 \--typedata3.2、离线迁移 3.2.1 备份 # 备份索引数据到文件里: 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# 备份到标准输出且进行压缩这里有一个需要注意的地方我查询索引信息有6.4G用下面的方式备份后得到一个789M的压缩文件这个压缩文件解压后有19G: elasticdump \--inputhttp://production.es.com:9200/my_index \--output$ \| gzip /data/my_index.json.gz# 把一个查询结果备份到文件中 elasticdump \--inputhttp://production.es.com:9200/my_index \--outputquery.json \--searchBody {query:{term:{username: admin}}}3.2.2 恢复 # 将备份文件的数据导入ES elasticdump \--input./data.json \--outputhttp://es.com:9200 4、Docker 环境下ES迁移 # 镜像下载 $ docker pull taskrabbit/elasticsearch-dump # 下面还是例子通过镜像导出数据到本地 # 创建一个文件夹用于保存导出数据 $ mkdir -p /root/data # 下面需要对路径进行映射并执行命令导出mapping $ docker run --rm -ti -v /data:/tmp taskrabbit/elasticsearch-dump \--inputhttp://production.es.com:9200/my_index \--output/tmp/my_index_mapping.json \--typemapping # 导出data $ docker run --rm -ti -v /root/data:/tmp taskrabbit/elasticsearch-dump \--inputhttp://192.168.56.104:9200/test_index \--output/tmp/elasticdump_export.json \--typedata----------------------------------------------------------------------------- # 以下内容为ES - ES的数据迁移例子 $ docker run --rm -ti taskrabbit/elasticsearch-dump \--inputhttp://production.es.com:9200/my_index \--outputhttp://staging.es.com:9200/my_index \--typemapping $ docker run --rm -ti taskrabbit/elasticsearch-dump \--inputhttp://production.es.com:9200/my_index \--outputhttp://staging.es.com:9200/my_index \--typedata 5、附录 # 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}}}# Copy a single shard data: elasticdump \--inputhttp://es.com:9200/api \--outputhttp://es.com:9200/api2 \--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
http://www.w-s-a.com/news/764477/

相关文章:

  • 如何减少网站建设中的错误温州网站公司哪家好
  • 宜章网站建设北京定制公交网站
  • 怎么让谷歌收录我的网站郑州网站建设更好
  • 在线视频网站开发方案phpaspnet网站开发实例视频
  • 正常做一个网站多少钱网站开发所遵循
  • 西部数码网站备份领英创建公司主页
  • 中山网站建设文化平台成都电商app开发
  • 无锡网站推广公司排名中国十大网站建设
  • 网站建设报价怎么差别那么大深圳开发公司网站建设
  • 京东商城网站建设方案书建设网站平台
  • 如何查询网站建设时间赤峰建网站的电话
  • 域名购买网站有哪些公司企业邮箱管理制度
  • 阿里云服务起做网站抖音seo推荐算法
  • 免费建站工具机械网站建设公司推荐
  • 怎么用自己主机做网站_如何做简单的网站
  • 阿里巴巴国际站跨境电商平台为什么有点网站打不开
  • 甘肃做网站哪家好网站开发 都包含什么语言
  • 合肥哪里有做网站的广告型网站怎么做的
  • 用dede做的网站国外免费空间哪个好
  • dede个人网站模板企点
  • 韩雪个人网站wordpress 怎么添加网站备案信息
  • 个人网站可以做地方技能培训班
  • 品牌营销策略研究无锡 网站 seo 优化
  • 在线推广网站的方法有哪些织梦网站首页目录在哪
  • 做爰全过程免费网站的视频做网站的几个步骤
  • cpa建站教程青海西宁制作网站企业
  • 简易的在线数据库网站模板网站多服务器建设
  • 成都seo网站建设花店网页模板html
  • 义乌市网站制作网络营销策略名词解释
  • 高端品牌网站建设图片wordpress 资源站主题