数据导出
elasticdump --input=http://ip:9200/baochuan_pro --output=C:/qbc/baochuan.json

数据导入
elasticdump --input=C:/qbc/baochuan.json --output=http://ip:9200/baochuan_pro

指定数据导出

elasticdump --input=http://localhost:9488/baochuan --output=C:/qbc/baochuan.json --searchBody={“query”:{“bool”:{“filter”:[{“bool”:{“must”:[{“match_phrase”:{“withFileTypeName”:{“query”:“7”}}}]}}]}},“_source”:{“include”:[“*”]}}

elasticdump --input=http://localhost:9488/baochuan --output=C:/qbc/baochuan.json --searchBody={“query”:{“bool”:{“filter”:[{“terms”:{“withFileTypeName”:[“9”,“12”,“597”]}}]}},“_source”:{“include”:[“*”]}}

一定要将es 语句转义

–limit 1000- 就是一次导出10000条数据

注意:–searchBody 不要单引号且需要转义

命令elasticdump: Import and export tools for elasticsearch
version: %%version%%Usage: elasticdump --input SOURCE --output DESTINATION [OPTIONS]--inputSource location (required)
--input-indexSource index and type(default: all, example: index/type)
--outputDestination location (required)
--output-indexDestination index and type(default: all, example: index/type)
--overwriteOverwrite output file if it exists(default: false)
--limitHow many objects to move in batch per operationlimit is approximate for file streams(default: 100)
--sizeHow many objects to retrieve(default: -1 -> no limit)
--concurrencyThe maximum number of requests the can be made concurrently to a specified transport.(default: 1)
--concurrencyIntervalThe length of time in milliseconds in which up to <intervalCap> requests can be madebefore the interval request count resets. Must be finite.(default: 5000)
--intervalCapThe maximum number of transport requests that can be made within a given <concurrencyInterval>.(default: 5)
--carryoverConcurrencyCountIf true, any incomplete requests from a <concurrencyInterval> will be carried over tothe next interval, effectively reducing the number of new requests that can be createdin that next interval.  If false, up to <intervalCap> requests can be created in thenext interval regardless of the number of incomplete requests from the previous interval.(default: true)
--throttleIntervalDelay in milliseconds between getting data from an inputTransport and sending it to anoutputTransport.(default: 1)
--debugDisplay the elasticsearch commands being used(default: false)
--quietSuppress all messages except for errors(default: false)
--typeWhat are we exporting?(default: data, options: [settings, analyzer, data, mapping, alias, template])
--deleteDelete documents one-by-one from the input as they aremoved.  Will not delete the source index(default: false)
--searchBodyPreform a partial extract based on search resultswhen ES is the input, default values areif ES > 5`'{"query": { "match_all": {} }, "stored_fields": ["*"], "_source": true }'`else`'{"query": { "match_all": {} }, "fields": ["*"], "_source": true }'`
--headersAdd custom headers to Elastisearch requests (helpful whenyour Elasticsearch instance sits behind a proxy)(default: '{"User-Agent": "elasticdump"}')
--paramsAdd custom parameters to Elastisearch requests uri. Helpful when you for examplewant to use elasticsearch preference(default: null)
--sourceOnlyOutput only the json contained within the document _sourceNormal: {"_index":"","_type":"","_id":"", "_source":{SOURCE}}sourceOnly: {SOURCE}(default: false)
--ignore-errorsWill continue the read/write loop on write error(default: false)
--scrollTimeTime the nodes will hold the requested search in order.(default: 10m)
--maxSocketsHow many simultaneous HTTP requests can we process make?(default:5 [node <= v0.10.x] /Infinity [node >= v0.11.x] )
--timeoutInteger containing the number of milliseconds to wait fora request to respond before aborting the request. Passeddirectly to the request library. Mostly used when you don'tcare too much if you lose some data when importingbut rather have speed.
--offsetInteger containing the number of rows you wish to skipahead from the input transport.  When importing a largeindex, things can go wrong, be it connectivity, crashes,someone forgetting to `screen`, etc.  This allows youto start the dump again from the last known line written(as logged by the `offset` in the output).  Please beadvised that since no sorting is specified when thedump is initially created, there's no real way toguarantee that the skipped rows have already beenwritten/parsed.  This is more of an option for whenyou want to get most data as possible in the indexwithout concern for losing some rows in the process,similar to the `timeout` option.(default: 0)
--noRefreshDisable input index refresh.Positive:1. Much increase index speed2. Much less hardware requirementsNegative:1. Recently added data may not be indexedRecommended to use with big data indexing,where speed and system health in a higher prioritythan recently added data.
--inputTransportProvide a custom js file to use as the input transport
--outputTransportProvide a custom js file to use as the output transport
--toLogWhen using a custom outputTransport, should log linesbe appended to the output stream?(default: true, except for `$`)
--transformA javascript, which will be called to modify documentsbefore writing it to destination. global variable 'doc'is available.Example script for computing a new field 'f2' as doubledvalue of field 'f1':doc._source["f2"] = doc._source.f1 * 2;May be used multiple times.Additionally, transform may be performed by a module. See [Module Transform](#module-transform) below.
--awsChainUse [standard](https://aws.amazon.com/blogs/security/a-new-and-standardized-way-to-manage-credentials-in-the-aws-sdks/) location and ordering for resolving credentials including environment variables, config files, EC2 and ECS metadata locations_Recommended option for use with AWS_
--awsAccessKeyId
--awsSecretAccessKeyWhen using Amazon Elasticsearch Service protected byAWS Identity and Access Management (IAM), provideyour Access Key ID and Secret Access Key.--sessionToken can also be optionally provided if using temporary credentials
--awsIniFileProfileAlternative to --awsAccessKeyId and --awsSecretAccessKey,loads credentials from a specified profile in aws ini file.For greater flexibility, consider using --awsChainand setting AWS_PROFILE and AWS_CONFIG_FILEenvironment variables to override defaults if needed
--awsIniFileNameOverride the default aws ini file name when using --awsIniFileProfileFilename is relative to ~/.aws/(default: config)
--support-big-int   Support big integer numbers
--retryAttempts  Integer indicating the number of times a request should be automatically re-attempted before failingwhen a connection fails with one of the following errors `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`,ETIMEDOUT`, `ECONNREFUSED`, `EHOSTUNREACH`, `EPIPE`, `EAI_AGAIN`(default: 0)--retryDelay   Integer indicating the back-off/break period between retry attempts (milliseconds)(default : 5000)
--parseExtraFieldsComma-separated list of meta-fields to be parsed
--fileSizesupports file splitting.  This value must be a string supported by the **bytes** module.     The following abbreviations must be used to signify size in terms of units         b for byteskb for kilobytesmb for megabytesgb for gigabytestb for terabytese.g. 10mb / 1gb / 1tbPartitioning helps to alleviate overflow/out of memory exceptions by efficiently segmenting filesinto smaller chunks that then be merged if needs be.
--fsCompressgzip data before sending outputting to file
--s3AccessKeyIdAWS access key ID
--s3SecretAccessKeyAWS secret access key
--s3RegionAWS region
--s3Endpoint        AWS endpoint can be used for AWS compatible backends such asOpenStack Swift and OpenStack Ceph
--s3SSLEnabled      Use SSL to connect to AWS [default true]--s3ForcePathStyle  Force path style URLs for S3 objects [default false]--s3Compressgzip data before sending to s3  --retryDelayBaseThe base number of milliseconds to use in the exponential backoff for operation retries. (s3)
--customBackoffActivate custom customBackoff function. (s3)
--tlsAuthEnable TLS X509 client authentication
--cert, --input-cert, --output-certClient certificate file. Use --cert if source and destination are identical.Otherwise, use the one prefixed with --input or --output as needed.
--key, --input-key, --output-keyPrivate key file. Use --key if source and destination are identical.Otherwise, use the one prefixed with --input or --output as needed.
--pass, --input-pass, --output-passPass phrase for the private key. Use --pass if source and destination are identical.Otherwise, use the one prefixed with --input or --output as needed.
--ca, --input-ca, --output-caCA certificate. Use --ca if source and destination are identical.Otherwise, use the one prefixed with --input or --output as needed.
--inputSocksProxy, --outputSocksProxySocks5 host address
--inputSocksPort, --outputSocksPortSocks5 host port
--helpThis page

es 数据导入和导出相关推荐

  1. java导出csv文件_R语言数据导入与导出

    R语言数据导入与导出 整这么一个系列,还是因为学R语言时遇到过一个非常"小白友好"的网站"DataScience Made Simple".相信很多人搜到过这个 ...

  2. csv导入pgsql不成功_数据科学 | pandas数据导入与导出

    ↑↑↑↑↑点击上方蓝色字关注我们! 『运筹OR帷幄』原创 作者:杨士锦 周岩 书生 编者按 当我们开始着手做一个数据分析项目时,选择和导入数据集是第一个步骤,而导出数据虽然非必需,但有时候我们也需要保 ...

  3. GEE系列:第4单元 Google 地球引擎中的数据导入和导出

    GEE从入门到实战的10个系列单元: GEE系列:第1单元 Google地球引擎简介 GEE系列:第2单元 探索数据集 GEE系列:​第3单元 栅格遥感影像波段特征及渲染可视化 GEE系列:第4单元 ...

  4. memcached命令行memcached数据导入和导出PHP链接memcached memcach

    memcached命令行 memcached数据导入和导出 PHP链接memcached 先安装php的memcache扩展 cd /usr/local/src/ wget  http://www.a ...

  5. 金算盘导出oracle,金算盘软件数据导入和导出操作方法.doc

    金算盘软件数据导入和导出操作方法 金算盘软件维护集锦 此为201003版本,本期讲一下"导入导出"的一些注意事项,以"往来期初"导入导出为例. 导入导出这个功能 ...

  6. oracle数据的导入和导出,Oracle入门教学--数据导入和导出

    数据导入和导出 一.数据导入工具 1.利用PLSQL直接进行数据表的粘贴 (1)下载测试表 (2)打开准备导入的文件并进行创建数据库表的SQL语句编辑 A.复制表头到新的sheet B.选择粘贴 C. ...

  7. java es 数据批量导入_elasticsearch批量数据导入和导出

    之前使用ES的时候建表Type时有个字段的类型搞错了.以至于用API查询时出错.所以就研究一下ES API做了一下ES批量导出和导入重构了Type 1:Java API批量导出 Settings se ...

  8. mariadb转mysql_MariaDB/MySQL备份和恢复(二):数据导入、导出

    1.导出.导入数据 load data infile和select into outfile语句是配套的.select into outfile语句是将检索出来的数据按格式导出到文件中,数据迁移跨数据 ...

  9. mysql数据导入、导出

    数据导入:把系统文件内容存储到数据库服务器的表里. 对于系统文件内容有一定要求:要有格式规律 数据导出 :把服务器表里的记录存储到系统文件里,这叫数据导出. 导出.导入数据 文件存储路径 默认是:/v ...

最新文章

  1. 博士发公众号文章也能评国奖?双一流高校新规引热议!
  2. 原始套接字学习笔记(1)
  3. 13.5 常见Random类
  4. leetcode 235. 二叉搜索树的最近公共祖先
  5. 1024到了,默默给自己点个赞!
  6. ubuntu离线安装依赖
  7. SiteMesh学习入门
  8. mysql显示表已存在_「Docker系列」 如何在Docker中部署MySQL数据库?
  9. Zookeeper11问
  10. mac sublime中文乱码问题解决
  11. aix linux ftp服务器,AIX主机FTP到LINUX服务器其中的磕碰记录
  12. 仿微博视频边下边播之滑动 TableView 自动播放
  13. 启动spark- sqI时:Error: A JNI error has occurred, please check your installation and try again Exceptio
  14. chi2inv函数 matlab_matlab函数列表(A~Z)【转】
  15. 关于如何解释机器学习的一些方法
  16. 5个海盗分100颗宝石
  17. 人工智能---图像识别
  18. DeepSORT论文翻译(SIMPLE ONLINE AND REALTIME TRACKING WITH A DEEP ASSOCIATION METRIC)
  19. 【工具篇】云原生架构,DevOps介绍
  20. 只能输入0-9的数字和小数点和-号

热门文章

  1. 【智力题】新数字游戏
  2. 计算机专业【本科生】毕业还不如【专科生】?
  3. 关于省市区,编辑页面怎么显示原来用户填写的
  4. 微信小程序登录获取不到头像和昵称解决办法!
  5. 关于2038年1月19日03:14:07 Tuesday
  6. UPS电池组的线损是什么?怎么计算?
  7. 学以致用——命令行中使用Java模块化技术编译、打包、运行iKb知识库应用
  8. c语言移动通信功率计算,《移动通信软件编程基础—C语言》第3章_运算符.ppt
  9. 2022中国甲烷排放控制峰会
  10. java使用数组来存储学生基本信息