﻿{"id":1207,"date":"2022-11-08T14:25:09","date_gmt":"2022-11-08T06:25:09","guid":{"rendered":"https:\/\/www.chenweikang.top\/?p=1207"},"modified":"2022-11-08T14:25:09","modified_gmt":"2022-11-08T06:25:09","slug":"elasticdump-%e5%a4%87%e4%bb%bd%e6%95%b0%e6%8d%ae%e8%ae%a4%e8%af%81%e5%af%86%e7%a0%81%e6%9c%89%e7%89%b9%e6%ae%8a%e5%ad%97%e7%ac%a6","status":"publish","type":"post","link":"https:\/\/www.chenweikang.top\/?p=1207","title":{"rendered":"elasticdump \u5907\u4efd\u6570\u636e\u8ba4\u8bc1\u5bc6\u7801\u6709\u7279\u6b8a\u5b57\u7b26"},"content":{"rendered":"\n<p>elasticsearch-dump \u662f\u4e00\u6b3e\u5f88\u597d\u7528\u7684es\u6570\u636e\u5907\u4efd\u3001\u8fc1\u79fb\u5de5\u5177\u3002\u5b98\u65b9\u5730\u5740\u4e3a\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/elasticsearch-dump\/elasticsearch-dump\" target=\"_blank\">https:\/\/github.com\/elasticsearch-dump\/elasticsearch-dump<\/a><\/p>\n\n\n\n<p><strong>\u5728\u901a\u8fc7\u547d\u4ee4\u5907\u4efd\u6570\u636e\u65f6\uff0c\u5982\u679chttp\u8ba4\u8bc1\u5bc6\u7801\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u53ef\u80fd\u4f1a\u5bfc\u81f4url\u89e3\u6790\u5f02\u5e38\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"206\" src=\"https:\/\/www.chenweikang.top\/wp-content\/uploads\/2022\/11\/image-1024x206.png\" alt=\"\" class=\"wp-image-1208\" srcset=\"https:\/\/www.chenweikang.top\/wp-content\/uploads\/2022\/11\/image-1024x206.png 1024w, https:\/\/www.chenweikang.top\/wp-content\/uploads\/2022\/11\/image-300x60.png 300w, https:\/\/www.chenweikang.top\/wp-content\/uploads\/2022\/11\/image-768x155.png 768w, https:\/\/www.chenweikang.top\/wp-content\/uploads\/2022\/11\/image-1536x309.png 1536w, https:\/\/www.chenweikang.top\/wp-content\/uploads\/2022\/11\/image.png 1828w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u57fa\u672c\u7684\u7528\u6cd5\u4e3a\uff1a<\/p><cite>       elasticdump --input=http:\/\/username:passowrd@localhost:9200\/my_index --output=http:\/\/username:password@localhost:9200\/my_index --type=data<\/cite><\/blockquote>\n\n\n\n<p>\u8fd9\u91cc\u5982\u679c\u5bc6\u7801\u5305\u542b '#' \u4f1a\u89e3\u6790\u5f02\u5e38\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>elasticdump --input=\/root\/esdump\/index_bak.json --output=http:\/\/elastic:xxx#9527@10.172.135.126:9200\/newindex --type=mapping<\/p><p>\u53ef\u4ee5\u770b\u5230\u8fd9\u91cc\u628aelastic\u89e3\u6790\u6210\u4e86\u8981\u5bfc\u51fa\u7684es\u57df\u540d\u5730\u5740\uff0c\u5b9e\u9645\u6211\u4eec\u7684\u5730\u5740\u662f10.172.xxx\uff1a<\/p><cite>Tue, 08 Nov 2022 04:33:29 GMT | starting dump<br>Tue, 08 Nov 2022 04:33:29 GMT | got 1 objects from source file (offset: 0)<br>Tue, 08 Nov 2022 04:34:49 GMT | Error Emitted => getaddrinfo ENOTFOUND elastic elastic:80<br>Tue, 08 Nov 2022 04:34:49 GMT | Error Emitted => getaddrinfo ENOTFOUND elastic elastic:80<\/cite><\/blockquote>\n\n\n\n<p>\u5c1d\u8bd5\u4e86\u4e00\u4e9b\u5176\u4ed6\u5199\u6cd5\u5747\u4e0d\u80fd\u89e3\u51b3\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u4ee5\u4e0b\u5199\u6cd5\u4e5f\u4e0d\u80fd\u89e3\u51b3\uff1a<\/p><cite>elasticdump --input=\/root\/esdump\/index_bak.json --output=http:\/\/'elastic:xxx#9527'@10.172.135.126:9200\/newindex --type=mapping<br>elasticdump --input=\/root\/esdump\/index_bak.json --output=\"http:\/\/elastic:\"xxx#9527\"@10.172.135.126:9200\/newindex\" --type=mapping<br>elasticdump --input=\/root\/esdump\/index_bak.json --output=http:\/\/elastic:\"xxx#9527\"@10.172.135.126:9200\/newindex --type=mapping<br>elasticdump --input=\/root\/esdump\/index_bak.json --output=http:\/\/\"elastic:xxx#9527\"@10.172.135.126:9200\/newindex --type=mapping<\/cite><\/blockquote>\n\n\n\n<p><strong>\u901a\u8fc7 elasticdump --help \u67e5\u770b\u5e2e\u52a9\u53d1\u73b0\u53ef\u901a\u8fc7 --httpAuthFile\u53c2\u6570\u6307\u5b9a\u8ba4\u8bc1\u6587\u4ef6\uff1a<\/strong><\/p>\n\n\n\n<p>\u7f16\u8f91\u8ba4\u8bc1\u6587\u4ef6 auth.ini \u5199\u5165\u5185\u5bb9:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\uff01\uff01\u6ce8\u610f\u8fd9\u91ccpassword\u5185\u5bb9\u5fc5\u987b\u7528\"\"\uff0c\u4e0d\u7136\u4e5f\u4f1a\u89e3\u6790\u5f02\u5e38<\/p><cite>user=elastic<br>password=\"xxx#9527\"<\/cite><\/blockquote>\n\n\n\n<p>\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u901a\u8fc7--httpAuthFile\u53c2\u6570\u6307\u5b9a\u8ba4\u8bc1\u6587\u4ef6\uff0c\u6210\u529f\u89e3\u51b3\uff1a<\/p><cite>elasticdump --input=\/root\/esdump\/index_bak.json --output=http:\/\/10.172.135.126:9200\/newindex --httpAuthFile=\/root\/esdump\/auth.ini --type=mapping<\/cite><\/blockquote>\n\n\n\n<p><\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.chenweikang.top\">\u5de6\u624b\u4ee3\u7801\u53f3\u624b\u8bd7<\/a> &raquo; <a href=\"https:\/\/www.chenweikang.top\/?p=1207\">elasticdump \u5907\u4efd\u6570\u636e\u8ba4\u8bc1\u5bc6\u7801\u6709\u7279\u6b8a\u5b57\u7b26<\/a><\/p><div class=\"__youshang\">\r\n            <div id=\"__youshang_popup\" class=\"wechat popup\" style=\"display: none;\">\r\n                <div class=\"head\">~\u8c22\u8c22\u6253\u8d4f~<\/div>\r\n                <div class=\"qrcode\"><div class=\"qrcode-li wechat\" ><img src=\"https:\/\/www.chenweikang.top\/wp-content\/uploads\/2019\/07\/wexin.png\" \/><\/div><div class=\"qrcode-li alipay\" style=\"display:none;\"><img src=\"https:\/\/www.chenweikang.top\/wp-content\/uploads\/2019\/07\/ali-pay.png\" \/><\/div><div class=\"qrcode-li hongbao\" style=\"display:none;\"><img src=\"https:\/\/www.chenweikang.top\/wp-content\/uploads\/2019\/07\/ali-hongbao.png\" \/><\/div><\/div>\r\n                <ul class=\"platform\"><li class=\"icon-wechat active\" data-bg-color=\"#05af4e\" data-thanks=\"~\u8c22\u8c22\u6253\u8d4f~\"><\/li><li class=\"icon-alipay \" data-bg-color=\"#00a2ea\" data-thanks=\"~\u8c22\u8c22\u6253\u8d4f~\"><\/li><li class=\"icon-hongbao \" data-bg-color=\"#dd5746\" data-thanks=\"<p>\u626b\u7801\u9886\u7ea2\u5305<\/p><p style='margin-top: 24px;'>\uff08\u4f59\u989d\u5b9d\u652f\u4ed8\u65f6\u53ef\u62b5\u73b0\uff09<\/p>\"><\/li><\/ul>\r\n            <\/div>\r\n            <a href=\"javascript:void(0);\" id=\"__youshang_btn\">\u8d4f<\/a>\r\n        <\/div>","protected":false},"excerpt":{"rendered":"<p>elasticsearch-dump \u662f\u4e00\u6b3e\u5f88\u597d\u7528\u7684es\u6570\u636e\u5907\u4efd\u3001\u8fc1\u79fb\u5de5\u5177\u3002\u5b98\u65b9\u5730\u5740\u4e3a\uff1ahttps:\/\/git [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,6],"tags":[],"class_list":["post-1207","post","type-post","status-publish","format-standard","hentry","category-website","category-suibi"],"_links":{"self":[{"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=\/wp\/v2\/posts\/1207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1207"}],"version-history":[{"count":0,"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=\/wp\/v2\/posts\/1207\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chenweikang.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}