热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

gzipnotworkingfromDocker

ElasticDumpversion:4.1.1Elasticsearchversion:6.5.1


  • ElasticDump version: 4.1.1

  • Elasticsearch version: 6.5.1

I would like to run elasticdump on Kubernetes with a Docker container:
When I use a simple json output, it runs successfully and I can see/read the file.
- "--rm"
- "--ti"
- "--noRefresh"
- "--input=http://elasticsearch:9200/my_index"
- "--output=/storage/new_index.json"
- "--type=data"

Last dummy line of json:

1
{"_index":"my_index","_type":"doc","_id":"rIa8W2cBCnVE0l0EdclA","_score":1,"_source":{"":"2018-11-28T19:12:12.267Z","headers":{"http_host":"x.x.x.x:5044","http_user_agent":"python-requests/2.18.4","http_version":"HTTP/1.1","http_accept":"*/*","request_path":"/","connection":"keep-alive","content_length":"56511142","accept_encoding":"gzip, deflate","request_method":"POST"},"HEADER":{"EXT_RELEASE":"0000000002","LANDSCAPE":"x","UUID":"380f597c-0cc9-43ea-851a-2633105cbfe2","RELEASE":"774","HOST":"random","SYSTEM_NUMBER":"123","SYSTEM_ID":"ABC","TENANT_ID":"999"},"":"1","DATA":{"WEBSERVICERECS":[],"BATCHSTEP":[],"ORGUNIT":{"OBJID":"00000000","SHORTTEXT":"","TEXT":""},"APCC":[],"AMCC":[],"ITEMUUIDRECS":[],"DBPROCED":[],"WEBSERVICESUMRECS":[],"TREXSUMRECS":[],"HTPCRECS":[],"VMC":[],"RFCSERVER":[],"EVENT":[],"ITEMSTRINGRECS":[],"SMTPSERVER":[],"APCCD":[],"SPOOLACTIV":[],"DBRECS":[{"INSTI":0,"READSEQREC":12,"DELTI":684,"DELREC":1,"PHYDELCNT":1,"PHYINSCNT":0,"READSEQBUF":0,"DBPROCNT":0,"INSREC":0,"CONNECTION_NAME":"DEFAULT","READDIRTI":0,"READSEQTI":14496,"READDIRCNT":8,"COMMITTI":9505,"READDIRREC":0,"DELCNT":1,"UPDTI":7351,"DBPROCTI":0,"UPDCNT":4,"UPDREC":4,"PHYREADCNT":15,"INSCNT":0,"READDIRBUF":7,"READSEQCNT":32,"PHYUPDCNT":4},{"INSTI":3194,"READSEQREC":0,"DELTI":0,"DELREC":0,"PHYDELCNT":0,"PHYINSCNT":2,"READSEQBUF":0,"DBPROCNT":0,"INSREC":2,"CONNECTION_NAME":"R/3*BTCJOBLG","READDIRTI":0,"READSEQTI":0,"READDIRCNT":0,"COMMITTI":2235,"READDIRREC":0,"DELCNT":0,"UPDTI":0,"DBPROCTI":0,"UPDCNT":0,"UPDREC":0,"PHYREADCNT":0,"INSCNT":2,"READDIRBUF":0,"READSEQCNT":0,"PHYUPDCNT":0}],"RFCCLIENT":[],"RFCTIMEINT":[],"SMTPSERVERD":[],"CLIENTINFO":[],"SPOOLPRINT":[],"ASTATRECS":[],"COMPHIER":{"COMPONENT":"","SUBAPP_ID":"","SUBAPPLICATION":"","COMPTEXT":"","DEVCLASS":"","APPTEXT":"","APPLICATION":"","SUBAPPTEXT":"","COMP_ID":"","APPL_ID":"","DEVTEXT":"","DEV_ID":""},"TABLERECS":[{"DIRCNT":0,"TABTIME":5779,"TABNAME":"BTCCTL","MODCNT":1,"SEQCNT":1},{"DIRCNT":0,"TABTIME":4192,"TABNAME":"TBTCP","MODCNT":2,"SEQCNT":1},{"DIRCNT":0,"TABTIME":3580,"TABNAME":"TBTCO","MODCNT":1,"SEQCNT":3},{"DIRCNT":0,"TABTIME":3194,"TABNAME":"TBTCJOBLOG2","MODCNT":2,"SEQCNT":0},{"DIRCNT":0,"TABTIME":2482,"TABNAME":"TBTCY","MODCNT":1,"SEQCNT":1},{"DIRCNT":0,"TABTIME":1719,"TABNAME":"WPBHELP_URL","MODCNT":0,"SEQCNT":2},{"DIRCNT":0,"TABTIME":1546,"TABNAME":"TBTC_TASK","MODCNT":0,"SEQCNT":0},{"DIRCNT":0,"TABTIME":1310,"TABNAME":"BTCJOBEPP","MODCNT":0,"SEQCNT":1},{"DIRCNT":0,"TABTIME":827,"TABNAME":"USR02","MODCNT":0,"SEQCNT":1},{"DIRCNT":0,"TABTIME":786,"TABNAME":"TBTCPV","MODCNT":0,"SEQCNT":1}],"HTPSDRECS":[],"ESISUMRECS":[],"FRONTEND":[],"RFCCLIDEST":[],"AMCP":[],"RFCSRVDEST":[],"APCS":[],"APCSD":[],"APPDATA":[],"ITEMINTRECS":[],"HTPCDRECS":[],"TREXRECS":[],"SMTPCLIENTD":[],"SMTPCLIENT":[],"AMCPD":[],"ESICHGRECS":[],"ESIRECS":[],"ITEMBYTEARRAYRECS":[],"HTPSRECS":[],"PASSPORTRECS":[{"ACTTYPE":2,"COMPONENT":1,"CONNECTION_COUNTER":0,"CLIENT":"100","ACTION":"CA_DTINF_DATA_COLLECTION","ROOT_CONTEXT_ID":"xyz","SERVICE":7,"CONNECTION_ID":"00000000000000000000000000000000","PRECOMPONENTNAME":"ABC/whatever","USERID":"dummy","COMPONENTNAME":"ABC/whatever"}],"AMCCD":[],"ADMMSG":[]},"host":"10.11.12.13"}}

But when I try to save it compressed:
- "--rm"
- "--ti"
- "--noRefresh"
- "--input=http://elasticsearch:9200/my_index"
- "--output=$ | gzip > /storage/my_index4.json.gz"
- "--type=data"

I get the following error:
Mon, 10 Dec 2018 16:13:00 GMT | starting dump
Mon, 10 Dec 2018 16:13:00 GMT | got 100 objects from source elasticsearch (offset: 0)
Mon, 10 Dec 2018 16:13:00 GMT | sent 100 objects to destination file, wrote 100
events.js:183
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '$ | gzip > /storage/myindex4.json.gz'

I tried "-v /data:/storage" but didn't help.
Any help is appreciated.

该提问来源于开源项目:elasticsearch-dump/elasticsearch-dump

Yes I got it. Still it doesn't work, so I'll use a different method for zipping. Thanks for your time.





   



推荐阅读
author-avatar
书友54330525
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有