{
    "componentChunkName": "component---src-templates-issues-tsx",
    "path": "/issues/151",
    "result": {"data":{"issuesJson":{"id":"911fa96c-979a-5954-9c82-0c5af2157c4f","title":"elasticsearch-dump/elasticsearch-dump: Elasticsearch 和 OpenSearch 的索引数据导入和导出工具","number":151,"bodyHTML":"<div align=\"center\" dir=\"auto\">\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a><br><br></p>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th align=\"right\">Repos</th>\n<th align=\"left\"><a href=\"https://github.com/elasticsearch-dump/elasticsearch-dump\">elasticsearch-dump/elasticsearch-dump</a></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"right\"><strong>Views</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/00ca5d67db79287df349a77e8218f037870f5201664ef4a7fdb8cdc616f37944/68747470733a2f2f76696577732e77686174696c656172656e65642e746f6461792f76696577732f6769746875622f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d702e737667\" alt=\"views\" data-canonical-src=\"https://views.whatilearened.today/views/github/elasticsearch-dump/elasticsearch-dump.svg\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Stars</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/15aea83d8b151f14866f4a9db0506a8177b0edc16e50d860f38e4fc46d0e3c99/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d703f636f6c6f723d663266303864266c6f676f3d556e64657274616c65266c6f676f436f6c6f723d656234363330\" alt=\"stars\" data-canonical-src=\"https://img.shields.io/github/stars/elasticsearch-dump/elasticsearch-dump?color=f2f08d&amp;logo=Undertale&amp;logoColor=eb4630\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Forks</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/bd96a6a65d8f4088552d6720e64ba7a98bfe8601f668fd5a9816d6618c6ae3dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d703f636f6c6f723d626138366562266c6f676f3d48616e647368616b65266c6f676f436f6c6f723d656136616136\" alt=\"forks\" data-canonical-src=\"https://img.shields.io/github/forks/elasticsearch-dump/elasticsearch-dump?color=ba86eb&amp;logo=Handshake&amp;logoColor=ea6aa6\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>License</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/fb73e7c363baf7c6b20bd88937bf3da6a66794b46523191f1500f3d59c68f956/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d703f6c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e53556845556741414144414141414177434159414141425841766d48414141414358424957584d41414173544141414c457745416d70775941414144336b6c45515652346e4f335953557a5555426748384a726f57567255474a66456d3773584e63534446784d544c327069347348456778654e526f77586770455742445552522532424e414e4f4b4f4b36366f6f4b4a4742586545475263574163455646475152484677516d483525324630774861655748493944554455354c356b6e6568644f62377a66652532423139636e434a47495243516945596c514237594a4979474c38616f73756c565a36695246516a69474b6b7564576735614c6c704f70704e586e665071773555304459524a6d56786a4367464633424c755a476d416f5655694b4541726d583744375553677351706f72674761336748664b34483663754262435644334771683141352532424c6745253242467749656e514d306a6f446f66714c6f48564e7742796d384370546e416d327a51713073676478624964515a556c416b7150415a3664676a303541446f59526f6f66792532466f5869726f376b3551586a4c6f70677a4b69514e6c4c4461716f4967754577426a7a7150355066446a45394479495879493633464d547751464d43567271774e61763451666f52673538514625324266724d485172454b3844546f434d714e4179574e4866786d54526f4c4f726d5352566747744466714345715a4f4851727a6f34706243557341333431365169364551394b476a6345465267484f724f4b6e5536574162396247455459656b4b7843766a546167394534706a653534446b3551503862624d4859762532464333756541654a6b50304f4778422532424a70426e4172595238455951516e6f4e31414e4661426e5050356c385372736559514c303641646b30464a5938484f5761424d6c6541486a683068506f73497a6c6f3876304125324633345a694f6548726130714b52504d5653493774762532423932747725324676687855654252713456454c674d376642714b354770526d6f514c584e7075625475367a6f4e52706754386e5051627138347764253246494375767978694b4871694e41664933774d367549684271476b4c696977414f734b44714f68743749747239567938536a52424557667941627225324668523142667056514664484a42253246423268683778376a36517077435665655951326b72554235436c636a3641326d3067576a25324244306d4c34397a573563517943484c4e37726a6c6d6d6174457958582532464372547a412532466f51785a6b576c39474a5443566f25324279546a3837253242346769504b6376307149486f344156344430565a727251493334706e70524d36357875652532467a417265453425324654253246536f676c664542794d7369517441546c4c3352414a355948725378365a44665337307337754d486842705225324659423573305057366f455270316236253246667252684b3353444c35546965364f515548516c5133735644752532427a50636b397657453973747225324236496a533967486d5750616861444a25324277434b364e494242587348423948796b587378774470686c436d416476706c6162554a4e6e5a504239342532464e7436784f6538587a4562503257684d335741673147756236744825324233513150673337365239713475716c6e6f36676448476a444f5139306562303141484d3672596975554a314f713472344656756a35765239427a4d3957674e764f7977446869495951467667626366774166774d764863615067425041253246447948476a50624e394138616d6562636477416444354e6633373574787165774e5552656f797677424958594c645170576c6877465771745061435044334173467541535636717171496c62304a766b564331464c39576b4c55556c55574b337a585a4c46432532423125324642726f46746f364f7358497545594a5034447a7a5732594656316f4a614141414141456c46546b5375516d4343\" alt=\"license\" data-canonical-src=\"https://img.shields.io/github/license/elasticsearch-dump/elasticsearch-dump?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD3klEQVR4nO3YSUzUUBgH8JroWVrUGJfEm7sXNcSDFxMTL2pi4sHEgxeNRowXgpEWBDURR%2BNANOKOK66ooKJGBXeEGRcWAcEVFGQRHFwQmH5%2F0wHaeWHI9DUDU5L5knehdOb7zfe%2B19cnCJGIRCQiEYlQB7YJIyGL8aosulVZ6iRFQjiGKkudWg5aLlpOppNXnfPqw5U0DYRJmVxjCgFF3BLuZGmAoVUiKEArmX7D7USgsQporgGa3gHfK4H6cuBbCVD3Gqh1A5%2BLgE%2BFwIenQM0joDofqLoHVNwBym8CpTnAm2zQq0sgdxbIdQZUlAkqPAZ6dgj05ADoYRoofy%2FoXiro7k5QXjLopgzKiQNlLDaqoIguEwBjzqP5PfDjE9DyIXyI63FMTwQFMCVrqwNav4QfoRg58QF%2BfrMHQrEK8DToCMqNAyWNHfxmTRoLOrmSRVgGtDfqCEqZOHQrzo4pbCUsA3416Qi6EQ9KGjcEFRgHOrOKnU6WAb9bGETYekKxCvjTag9E4pje54Dk5QP8bbMHYv%2FC3ueAeJkP0OGxB%2BJpBnArYR8EYQQnoN1ANFaBnPP5l8SrseYQL06Adk0FJY8HOWaBMleAHjh0hPosIzlo8v0A%2F34ZiOeHra0qKRPMVSI7tv%2B92tw%2FvhxUeBRq4VELgM7fBqK5GpRmoQLXNpubTu6zoNRpgT8nPQbq84wd%2FICuvyxiKHqiNAfI3wM6uIhBqGkLiiwAOsKDqOht7Itr9Vy8SjRBEWfyAbr%2FhR1BfpVQFdHJB%2FB2hh7x7j6QpwCVeeYQ2krUB5Clcj6A2m0gWj%2BD0mL49zW5cQyCHLN7rjlmmatEyXX%2FCrTzA%2FoQxZkWl9GJTCVo%2ByTj87%2B4giPKcv0qIHo4AV4D0VZrrQI34pnpRM65xue%2FzAreE4%2FT%2FSoglfEByMsiQtATlL3RAJ5YHrSx6ZDfS70s7uMHhBpR%2FYB5s0PW6oERp1b6%2FfrRhK3SDL5Tie6OQUHQlQ3sVDu%2BzPck9vWE9str%2B6IjS9gHmWPahaDJ%2BwCK6NIBBXsHB9HykXsxwDphlCmAdvplabUJNnZPB94%2FNt6xOe8XzEbP2WhM3WAg1Gub6tH%2B3Q1Pg376R9q4uqlno6gdHGjDOQ90eb01AHM6rYiuUJ1Oq4r4FVuj5vR9BzM9WgNvOywDhiIYQFvgbcfwAfwMvHcaPgBPA%2FDyHGjPbN9A8amebcdwAdD5Nf375txqewNUReoyvwBIXYLdQpWlhwFWqtPaCPD3AsFuASV6qqqIlb0JvkVC1FL9WkLUUlUWK3zXZLFC%2B1%2FBroFto6OsXIuEYJP4DzzW2YFV1oJaAAAAAElFTkSuQmCC\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>UpdatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/21ba7860826785fdfb943a4354fa470301be82731657cbef6d2f2eb3112e9992/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d703f646973706c61795f74696d657374616d703d636f6d6d6974746572266c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d557064617465644174\" alt=\"last-commit\" data-canonical-src=\"https://img.shields.io/github/last-commit/elasticsearch-dump/elasticsearch-dump?display_timestamp=committer&amp;logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=UpdatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>CreatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/6391bd0191a1b4fca54dcf4d3e352421ca885563b544aa78e86a79796496130c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f637265617465642d61742f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d703f6c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d437265617465644174\" alt=\"create-at\" data-canonical-src=\"https://img.shields.io/github/created-at/elasticsearch-dump/elasticsearch-dump?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=CreatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<a href=\"https://github.com/opsre/awesome-ops\">\n</a><p dir=\"auto\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/b964a36ea4078c39f603d46a29436371c7541a2f26e0228d7b21b9d9805b43d3/68747470733a2f2f736f6369616c6966792e6769742e63692f6f707372652f617765736f6d652d6f70732f696d6167653f6465736372697074696f6e3d3126666f6e743d42697474657226666f726b733d31266973737565733d31266c616e67756167653d31266c6f676f3d6874747073253341253246253246617661746172732e67697468756275736572636f6e74656e742e636f6d25324675253246313838353638303230266e616d653d31266f776e65723d31267061747465726e3d436972637569742b426f6172642670756c6c733d31267374617267617a6572733d31267468656d653d4c69676874\" alt=\"\" data-canonical-src=\"https://socialify.git.ci/opsre/awesome-ops/image?description=1&amp;font=Bitter&amp;forks=1&amp;issues=1&amp;language=1&amp;logo=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F188568020&amp;name=1&amp;owner=1&amp;pattern=Circuit+Board&amp;pulls=1&amp;stargazers=1&amp;theme=Light\" style=\"max-width: 100%;\"></a></p>\n<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a>\n</div>\n<h1 dir=\"auto\">elasticdump</h1>\n<p dir=\"auto\">Tools for moving and saving indices from Elasticsearch and OpenSearch</p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/fc6dc7f2512cf92fe52bddfcb9cc181c6c7da4ca6262557ab5639663c6875667/68747470733a2f2f7261772e6769746875622e636f6d2f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d702f6d61737465722f656c617374696364756d702e6a7067\"><img src=\"https://camo.githubusercontent.com/fc6dc7f2512cf92fe52bddfcb9cc181c6c7da4ca6262557ab5639663c6875667/68747470733a2f2f7261772e6769746875622e636f6d2f656c61737469637365617263682d64756d702f656c61737469637365617263682d64756d702f6d61737465722f656c617374696364756d702e6a7067\" alt=\"picture\" data-canonical-src=\"https://raw.github.com/elasticsearch-dump/elasticsearch-dump/master/elasticdump.jpg\" style=\"max-width: 100%;\"></a></p>\n<hr>\n<p dir=\"auto\"><a href=\"https://github.com/elasticsearch-dump/elasticsearch-dump\"><img src=\"https://github.com/elasticsearch-dump/elasticsearch-dump/actions/workflows/elasticdump.yaml/badge.svg\" alt=\"Build Status\" style=\"max-width: 100%;\"></a><br>\n<a href=\"https://npmjs.org/package/elasticdump\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/b7cd3e9a12404c0f6ce56feead1a12c17fe2265dd9d0c2aad9c50f388c1be034/68747470733a2f2f62616467652e667572792e696f2f6a732f656c617374696364756d702e737667\" alt=\"npm version\" data-canonical-src=\"https://badge.fury.io/js/elasticdump.svg\" style=\"max-width: 100%;\"></a><br>\n<a href=\"https://npmjs.org/package/elasticdump\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/8bfde8e6d08052181917bf497610aeb9031d10ef9eeff07d4afac292538ff0c1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64772f656c617374696364756d702e737667\" alt=\"NPM Weekly stats\" data-canonical-src=\"https://img.shields.io/npm/dw/elasticdump.svg\" style=\"max-width: 100%;\"></a><br>\n<a href=\"https://npmjs.org/package/elasticdump\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/2bcbdd637c832ce7ed8c38a6b4c5396627767f577921e69ff8125cdeb7fc75b6/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f656c617374696364756d702e737667\" alt=\"NPM Monthly stats\" data-canonical-src=\"https://img.shields.io/npm/dm/elasticdump.svg\" style=\"max-width: 100%;\"></a><br>\n<a href=\"https://hub.docker.com/r/elasticdump/elasticsearch-dump/\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/32a37281f7b45e00bcd9c209fc8a5a47f39057dcda5628603b158b380d3921cb/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f656c617374696364756d702f656c61737469637365617263682d64756d702e737667\" alt=\"DockerHub Badge\" data-canonical-src=\"https://img.shields.io/docker/pulls/elasticdump/elasticsearch-dump.svg\" style=\"max-width: 100%;\"></a><br>\n<a href=\"https://hub.docker.com/r/taskrabbit/elasticsearch-dump/\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/884f8f31ea289d8a156b6f5c9bab0180a0012ff3cf87ce7481e9f9f68e154190/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f7461736b7261626269742f656c61737469637365617263682d64756d702e737667\" alt=\"DockerHub Badge\" data-canonical-src=\"https://img.shields.io/docker/pulls/taskrabbit/elasticsearch-dump.svg\" style=\"max-width: 100%;\"></a></p>\n<h2 dir=\"auto\">Version Warnings!</h2>\n<ul dir=\"auto\">\n<li>Version <code class=\"notranslate\">1.0.0</code> of Elasticdump changes the format of the files created by the dump.  Files created with version <code class=\"notranslate\">0.x.x</code> of this tool are likely not to work with versions going forward.  To learn more about the breaking changes, vist the release notes for version <a href=\"https://github.com/elasticsearch-dump/elasticsearch-dump/releases/tag/v1.0.0\"><code class=\"notranslate\">1.0.0</code></a>.  If you recive an \"out of memory\" error, this is probably or most likely the cause.</li>\n<li>Version <code class=\"notranslate\">2.0.0</code> of Elasticdump removes the <code class=\"notranslate\">bulk</code> options.  These options were buggy, and differ between versions of Elasticsearch.  If you need to export multiple indexes, look for the <code class=\"notranslate\">multielasticdump</code> section of the tool.</li>\n<li>Version <code class=\"notranslate\">2.1.0</code> of Elasticdump moves from using <code class=\"notranslate\">scan/scroll</code> (ES 1.x) to just <code class=\"notranslate\">scroll</code> (ES 2.x).  This is a backwards-compatible change within Elasticsearch, but performance may suffer on Elasticsearch versions prior to 2.x.</li>\n<li>Version <code class=\"notranslate\">3.0.0</code> of Elasticdump has the default queries updated to only work for ElasticSearch version 5+.  The tool <em>may</em> be compatible with earlier versions of Elasticsearch, but our version detection method may not work for all ES cluster topologies</li>\n<li>Version <code class=\"notranslate\">5.0.0</code> of Elasticdump contains a breaking change for the s3 transport. <em>s3Bucket</em> and <em>s3RecordKey</em> params are no longer supported please use s3urls instead</li>\n<li>Version <code class=\"notranslate\">6.1.0</code> and higher of Elasticdump contains a change to the upload/dump process. This change allows for overlapping promise processing. The benefit of which is improved performance due increased parallel processing, but a side-effect exists where-by records (data-set) aren't processed in a sequential order (the ordering is no longer guaranteed)</li>\n<li>Version <code class=\"notranslate\">6.67.0</code> and higher of Elasticdump will quit if the node.js version does not match the minimum requirement needed (v10.0.0)</li>\n<li>Version <code class=\"notranslate\">6.76.0</code> and higher of Elasticdump added support for OpenSearch (forked from Elasticsearch 7.10.2)</li>\n</ul>\n<h2 dir=\"auto\">Installing</h2>\n<p dir=\"auto\">(local)</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm install elasticdump\n./bin/elasticdump\"><pre class=\"notranslate\">npm install elasticdump\n./bin/elasticdump</pre></div>\n<p dir=\"auto\">(global)</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm install elasticdump -g\nelasticdump\"><pre class=\"notranslate\">npm install elasticdump -g\nelasticdump</pre></div>\n<h2 dir=\"auto\">Use</h2>\n<h3 dir=\"auto\">Standard Install</h3>\n<p dir=\"auto\">Elasticdump works by sending an <code class=\"notranslate\">input</code> to an <code class=\"notranslate\">output</code>. Both can be either an elasticsearch URL or a File.</p>\n<p dir=\"auto\">Elasticsearch/OpenSearch:</p>\n<ul dir=\"auto\">\n<li>format:  <code class=\"notranslate\">{protocol}://{host}:{port}/{index}</code></li>\n<li>example: <code class=\"notranslate\">http://127.0.0.1:9200/my_index</code></li>\n</ul>\n<p dir=\"auto\">File:</p>\n<ul dir=\"auto\">\n<li>format:  <code class=\"notranslate\">{FilePath}</code></li>\n<li>example: <code class=\"notranslate\">/Users/evantahler/Desktop/dump.json</code></li>\n</ul>\n<p dir=\"auto\">Stdio:</p>\n<ul dir=\"auto\">\n<li>format: stdin / stdout</li>\n<li>format: <code class=\"notranslate\">$</code></li>\n</ul>\n<p dir=\"auto\">You can then do things like:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Copy an index from production to staging with analyzer and mapping:\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=analyzer\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=mapping\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=data\n\n# Backup index data to a file:\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/data/my_index_mapping.json \\\n  --type=mapping\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/data/my_index.json \\\n  --type=data\n\n# Backup and index to a gzip using stdout:\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=$ \\\n  | gzip &gt; /data/my_index.json.gz\n\n# Backup the results of a query to a file\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=query.json \\\n  --searchBody=&quot;{\\&quot;query\\&quot;:{\\&quot;term\\&quot;:{\\&quot;username\\&quot;: \\&quot;admin\\&quot;}}}&quot;\n  \n# Specify searchBody from a file\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=query.json \\\n  --searchBody=@/data/searchbody.json  \n\n# Copy a single shard data:\nelasticdump \\\n  --input=http://es.com:9200/api \\\n  --output=http://es.com:9200/api2 \\\n  --input-params=&quot;{\\&quot;preference\\&quot;:\\&quot;_shards:0\\&quot;}&quot;\n\n# Backup aliases to a file\nelasticdump \\\n  --input=http://es.com:9200/index-name/alias-filter \\\n  --output=alias.json \\\n  --type=alias\n\n# Import aliases into ES\nelasticdump \\\n  --input=./alias.json \\\n  --output=http://es.com:9200 \\\n  --type=alias\n\n# Backup templates to a file\nelasticdump \\\n  --input=http://es.com:9200/template-filter \\\n  --output=templates.json \\\n  --type=template\n\n# Import templates into ES\nelasticdump \\\n  --input=./templates.json \\\n  --output=http://es.com:9200 \\\n  --type=template\n\n# Split files into multiple parts\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/data/my_index.json \\\n  --fileSize=10mb\n\n# Import data from S3 into ES (using s3urls)\nelasticdump \\\n  --s3AccessKeyId &quot;${access_key_id}&quot; \\\n  --s3SecretAccessKey &quot;${access_key_secret}&quot; \\\n  --input &quot;s3://${bucket_name}/${file_name}.json&quot; \\\n  --output=http://production.es.com:9200/my_index\n\n# Export ES data to S3 (using s3urls)\nelasticdump \\\n  --s3AccessKeyId &quot;${access_key_id}&quot; \\\n  --s3SecretAccessKey &quot;${access_key_secret}&quot; \\\n  --input=http://production.es.com:9200/my_index \\\n  --output &quot;s3://${bucket_name}/${file_name}.json&quot;\n\n# Import data from MINIO (s3 compatible) into ES (using s3urls)\nelasticdump \\\n  --s3AccessKeyId &quot;${access_key_id}&quot; \\\n  --s3SecretAccessKey &quot;${access_key_secret}&quot; \\\n  --input &quot;s3://${bucket_name}/${file_name}.json&quot; \\\n  --output=http://production.es.com:9200/my_index\n  --s3ForcePathStyle true\n  --s3Endpoint https://production.minio.co\n\n# Export ES data to MINIO (s3 compatible) (using s3urls)\nelasticdump \\\n  --s3AccessKeyId &quot;${access_key_id}&quot; \\\n  --s3SecretAccessKey &quot;${access_key_secret}&quot; \\\n  --input=http://production.es.com:9200/my_index \\\n  --output &quot;s3://${bucket_name}/${file_name}.json&quot;\n  --s3ForcePathStyle true\n  --s3Endpoint https://production.minio.co\n\n# Import data from CSV file into ES (using csvurls)\nelasticdump \\\n  # csv:// prefix must be included to allow parsing of csv files\n  # --input &quot;csv://${file_path}.csv&quot; \\\n  --input &quot;csv:///data/cars.csv&quot;\n  --output=http://production.es.com:9200/my_index \\\n  --csvSkipRows 1    # used to skip parsed rows (this does not include the headers row)\n  --csvDelimiter &quot;;&quot; # default csvDelimiter is ','\"><pre class=\"notranslate\"><span class=\"pl-c\"><span class=\"pl-c\">#</span> Copy an index from production to staging with analyzer and mapping:</span>\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=analyzer\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=mapping\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=data\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Backup index data to a file:</span>\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/data/my_index_mapping.json \\\n  --type=mapping\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/data/my_index.json \\\n  --type=data\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Backup and index to a gzip using stdout:</span>\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=$ \\\n  <span class=\"pl-k\">|</span> gzip <span class=\"pl-k\">&gt;</span> /data/my_index.json.gz\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Backup the results of a query to a file</span>\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=query.json \\\n  --searchBody=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>{<span class=\"pl-cce\">\\\"</span>query<span class=\"pl-cce\">\\\"</span>:{<span class=\"pl-cce\">\\\"</span>term<span class=\"pl-cce\">\\\"</span>:{<span class=\"pl-cce\">\\\"</span>username<span class=\"pl-cce\">\\\"</span>: <span class=\"pl-cce\">\\\"</span>admin<span class=\"pl-cce\">\\\"</span>}}}<span class=\"pl-pds\">\"</span></span>\n  \n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Specify searchBody from a file</span>\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=query.json \\\n  --searchBody=@/data/searchbody.json  \n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Copy a single shard data:</span>\nelasticdump \\\n  --input=http://es.com:9200/api \\\n  --output=http://es.com:9200/api2 \\\n  --input-params=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>{<span class=\"pl-cce\">\\\"</span>preference<span class=\"pl-cce\">\\\"</span>:<span class=\"pl-cce\">\\\"</span>_shards:0<span class=\"pl-cce\">\\\"</span>}<span class=\"pl-pds\">\"</span></span>\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Backup aliases to a file</span>\nelasticdump \\\n  --input=http://es.com:9200/index-name/alias-filter \\\n  --output=alias.json \\\n  --type=alias\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Import aliases into ES</span>\nelasticdump \\\n  --input=./alias.json \\\n  --output=http://es.com:9200 \\\n  --type=alias\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Backup templates to a file</span>\nelasticdump \\\n  --input=http://es.com:9200/template-filter \\\n  --output=templates.json \\\n  --type=template\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Import templates into ES</span>\nelasticdump \\\n  --input=./templates.json \\\n  --output=http://es.com:9200 \\\n  --type=template\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Split files into multiple parts</span>\nelasticdump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/data/my_index.json \\\n  --fileSize=10mb\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Import data from S3 into ES (using s3urls)</span>\nelasticdump \\\n  --s3AccessKeyId <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_id}</span><span class=\"pl-pds\">\"</span></span> \\\n  --s3SecretAccessKey <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_secret}</span><span class=\"pl-pds\">\"</span></span> \\\n  --input <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>s3://<span class=\"pl-smi\">${bucket_name}</span>/<span class=\"pl-smi\">${file_name}</span>.json<span class=\"pl-pds\">\"</span></span> \\\n  --output=http://production.es.com:9200/my_index\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Export ES data to S3 (using s3urls)</span>\nelasticdump \\\n  --s3AccessKeyId <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_id}</span><span class=\"pl-pds\">\"</span></span> \\\n  --s3SecretAccessKey <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_secret}</span><span class=\"pl-pds\">\"</span></span> \\\n  --input=http://production.es.com:9200/my_index \\\n  --output <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>s3://<span class=\"pl-smi\">${bucket_name}</span>/<span class=\"pl-smi\">${file_name}</span>.json<span class=\"pl-pds\">\"</span></span>\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Import data from MINIO (s3 compatible) into ES (using s3urls)</span>\nelasticdump \\\n  --s3AccessKeyId <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_id}</span><span class=\"pl-pds\">\"</span></span> \\\n  --s3SecretAccessKey <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_secret}</span><span class=\"pl-pds\">\"</span></span> \\\n  --input <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>s3://<span class=\"pl-smi\">${bucket_name}</span>/<span class=\"pl-smi\">${file_name}</span>.json<span class=\"pl-pds\">\"</span></span> \\\n  --output=http://production.es.com:9200/my_index\n  --s3ForcePathStyle <span class=\"pl-c1\">true</span>\n  --s3Endpoint https://production.minio.co\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Export ES data to MINIO (s3 compatible) (using s3urls)</span>\nelasticdump \\\n  --s3AccessKeyId <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_id}</span><span class=\"pl-pds\">\"</span></span> \\\n  --s3SecretAccessKey <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${access_key_secret}</span><span class=\"pl-pds\">\"</span></span> \\\n  --input=http://production.es.com:9200/my_index \\\n  --output <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>s3://<span class=\"pl-smi\">${bucket_name}</span>/<span class=\"pl-smi\">${file_name}</span>.json<span class=\"pl-pds\">\"</span></span>\n  --s3ForcePathStyle <span class=\"pl-c1\">true</span>\n  --s3Endpoint https://production.minio.co\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Import data from CSV file into ES (using csvurls)</span>\nelasticdump \\\n  <span class=\"pl-c\"><span class=\"pl-c\">#</span> csv:// prefix must be included to allow parsing of csv files</span>\n  <span class=\"pl-c\"><span class=\"pl-c\">#</span> --input \"csv://${file_path}.csv\" \\</span>\n  --input <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>csv:///data/cars.csv<span class=\"pl-pds\">\"</span></span>\n  --output=http://production.es.com:9200/my_index \\\n  --csvSkipRows 1    <span class=\"pl-c\"><span class=\"pl-c\">#</span> used to skip parsed rows (this does not include the headers row)</span>\n  --csvDelimiter <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>;<span class=\"pl-pds\">\"</span></span> <span class=\"pl-c\"><span class=\"pl-c\">#</span> default csvDelimiter is ','</span></pre></div>\n<h3 dir=\"auto\">Non-Standard Install</h3>\n<p dir=\"auto\">If Elasticsearch/OpenSearch is not being served from the root directory the <code class=\"notranslate\">--input-index</code> and<br>\n<code class=\"notranslate\">--output-index</code> are required. If they are not provided, the additional sub-directories will<br>\nbe parsed for index and type.</p>\n<p dir=\"auto\">Elasticsearch/OpenSearch:</p>\n<ul dir=\"auto\">\n<li>format:  <code class=\"notranslate\">{protocol}://{host}:{port}/{sub}/{directory...}</code></li>\n<li>example: <code class=\"notranslate\">http://127.0.0.1:9200/api/search</code></li>\n</ul>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Copy a single index from a elasticsearch:\nelasticdump \\\n  --input=http://es.com:9200/api/search \\\n  --input-index=my_index \\\n  --output=http://es.com:9200/api/search \\\n  --output-index=my_index \\\n  --type=mapping\n\n# Copy a single type:\nelasticdump \\\n  --input=http://es.com:9200/api/search \\\n  --input-index=my_index/my_type \\\n  --output=http://es.com:9200/api/search \\\n  --output-index=my_index \\\n  --type=mapping\n\"><pre class=\"notranslate\"><span class=\"pl-c\"><span class=\"pl-c\">#</span> Copy a single index from a elasticsearch:</span>\nelasticdump \\\n  --input=http://es.com:9200/api/search \\\n  --input-index=my_index \\\n  --output=http://es.com:9200/api/search \\\n  --output-index=my_index \\\n  --type=mapping\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Copy a single type:</span>\nelasticdump \\\n  --input=http://es.com:9200/api/search \\\n  --input-index=my_index/my_type \\\n  --output=http://es.com:9200/api/search \\\n  --output-index=my_index \\\n  --type=mapping\n</pre></div>\n<h3 dir=\"auto\">Docker install</h3>\n<p dir=\"auto\">If you prefer using docker to use elasticdump, you can download this project from docker hub:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"docker pull elasticdump/elasticsearch-dump\"><pre class=\"notranslate\">docker pull elasticdump/elasticsearch-dump</pre></div>\n<p dir=\"auto\">Then you can use it just by :</p>\n<ul dir=\"auto\">\n<li>using <code class=\"notranslate\">docker run --rm -ti elasticdump/elasticsearch-dump</code></li>\n<li>you'll need to mount your file storage dir <code class=\"notranslate\">-v &lt;your dumps dir&gt;:&lt;your mount point&gt;</code> to your docker container</li>\n</ul>\n<p dir=\"auto\">Example:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Copy an index from production to staging with mappings:\ndocker run --rm -ti elasticdump/elasticsearch-dump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=mapping\ndocker run --rm -ti elasticdump/elasticsearch-dump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=data\n\n# Backup index data to a file:\ndocker run --rm -ti -v /data:/tmp elasticdump/elasticsearch-dump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/tmp/my_index_mapping.json \\\n  --type=data\"><pre class=\"notranslate\"><span class=\"pl-c\"><span class=\"pl-c\">#</span> Copy an index from production to staging with mappings:</span>\ndocker run --rm -ti elasticdump/elasticsearch-dump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=mapping\ndocker run --rm -ti elasticdump/elasticsearch-dump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=http://staging.es.com:9200/my_index \\\n  --type=data\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Backup index data to a file:</span>\ndocker run --rm -ti -v /data:/tmp elasticdump/elasticsearch-dump \\\n  --input=http://production.es.com:9200/my_index \\\n  --output=/tmp/my_index_mapping.json \\\n  --type=data</pre></div>\n<p dir=\"auto\">If you need to run using <code class=\"notranslate\">localhost</code> as your ES host:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"docker run --net=host --rm -ti elasticdump/elasticsearch-dump \\\n  --input=http://staging.es.com:9200/my_index \\\n  --output=http://localhost:9200/my_index \\\n  --type=data\"><pre class=\"notranslate\">docker run --net=host --rm -ti elasticdump/elasticsearch-dump \\\n  --input=http://staging.es.com:9200/my_index \\\n  --output=http://localhost:9200/my_index \\\n  --type=data</pre></div>\n<h2 dir=\"auto\">Dump Format</h2>\n<p dir=\"auto\">The file format generated by this tool is line-delimited JSON files.  The dump file itself is not valid JSON, but each line is.  We do this so that dumpfiles can be streamed and appended without worrying about whole-file parser integrity.</p>\n<p dir=\"auto\">For example, if you wanted to parse every line, you could do:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"while read LINE; do jsonlint-py &quot;${LINE}&quot; ; done &lt; dump.data.json\"><pre class=\"notranslate\"><code class=\"notranslate\">while read LINE; do jsonlint-py \"${LINE}\" ; done &lt; dump.data.json\n</code></pre></div>\n<h2 dir=\"auto\">Options</h2>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"elasticdump: Import and export tools for elasticsearch\nversion: %%version%%\n\nUsage: elasticdump --input SOURCE --output DESTINATION [OPTIONS]\n\nCore options\n--------------------\n--input\n                    Source location (required)\n\n--input-index\n                    Source index and type\n                    (default: all, example: index/type)\n\n--output\n                    Destination location (required)\n\n--output-index\n                    Destination index and type\n                    (default: all, example: index/type)\n\n\nOptions\n--------------------\n--big-int-fields\n                    Specifies a comma-seperated list of fields that should be checked for big-int support\n                    (default '')\n\n--bulkAction\n                    Sets the operation type to be used when preparing the request body to be sent to elastic search.\n                    For more info - https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html\n                    (default: index, options: [index, update, delete, create)\n\n--ca, --input-ca, --output-ca\n                    CA certificate. Use --ca if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--cert, --input-cert, --output-cert\n                    Client certificate file. Use --cert if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--csvConfigs\n                    Set all fast-csv configurations\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--csvCustomHeaders  A comma-seperated listed of values that will be used as headers for your data. This param must\n                    be used in conjunction with `csvRenameHeaders`\n                    (default : null)\n\n--csvDelimiter\n                    The delimiter that will separate columns.\n                    (default : ',')\n\n--csvFirstRowAsHeaders\n                    If set to true the first row will be treated as the headers.\n                    (default : true)\n\n--csvHandleNestedData\n                    Set to true to handle nested JSON/CSV data.\n                    NB : This is a very opinionated implementaton !\n                    (default : false)\n\n--csvIdColumn\n                    Name of the column to extract the record identifier (id) from\n                    When exporting to CSV this column can be used to override the default id (@id) column name\n                    (default : null)\n\n--csvIgnoreAutoColumns\n                    Set to true to prevent the following columns @id, @index, @type from being written to the output file\n                    (default : false)\n\n--csvIgnoreEmpty\n                    Set to true to ignore empty rows.\n                    (default : false)\n\n--csvIncludeEndRowDelimiter\n                    Set to true to include a row delimiter at the end of the csv\n                    (default : false)\n\n--csvIndexColumn\n                    Name of the column to extract the record index from\n                    When exporting to CSV this column can be used to override the default index (@index) column name\n                    (default : null)\n\n--csvLTrim\n                    Set to true to left trim all columns.\n                    (default : false)\n\n--csvMaxRows\n                    If number is &gt; 0 then only the specified number of rows will be parsed.(e.g. 100 would return the first 100 rows of data)\n                    (default : 0)\n\n--csvRTrim\n                    Set to true to right trim all columns.\n                    (default : false)\n\n--csvRenameHeaders\n                    If you want the first line of the file to be removed and replaced by the one provided in the `csvCustomHeaders` option\n                    (default : true)\n\n--csvSkipLines\n                    If number is &gt; 0 the specified number of lines will be skipped.\n                    (default : 0)\n\n--csvSkipRows\n                    If number is &gt; 0 then the specified number of parsed rows will be skipped\n                    NB:  (If the first row is treated as headers, they aren't a part of the count)\n                    (default : 0)\n\n--csvTrim\n                    Set to true to trim all white space from columns.\n                    (default : false)\n\n--csvTypeColumn\n                    Name of the column to extract the record type from\n                    When exporting to CSV this column can be used to override the default type (@type) column name\n                    (default : null)\n\n--csvWriteHeaders   Determines if headers should be written to the csv file.\n                    (default : true)\n\n--customBackoff\n                    Activate custom customBackoff function. (s3)\n\n--debug\n                    Display the elasticsearch commands being used\n                    (default: false)\n\n--delete\n                    Delete documents one-by-one from the input as they are\n                    moved.  Will not delete the source index\n                    (default: false)\n\n--delete-with-routing\n                    Passes the routing query-param to the delete function\n                    used to route operations to a specific shard.\n                    (default: false)\n\n--esCompress\n                    if true, add an Accept-Encoding header to request compressed content encodings from the server (if not already present)\n                    and decode supported content encodings in the response.\n                    Note: Automatic decoding of the response content is performed on the body data returned through request\n                    (both through the request stream and passed to the callback function) but is not performed on the response stream\n                    (available from the response event) which is the unmodified http.IncomingMessage object which may contain compressed data.\n                    See example below.\n\n--fileSize\n                    supports file splitting.  This value must be a string supported by the **bytes** module.\n                    The following abbreviations must be used to signify size in terms of units\n                    b for bytes\n                    kb for kilobytes\n                    mb for megabytes\n                    gb for gigabytes\n                    tb for terabytes\n                    e.g. 10mb / 1gb / 1tb\n                    Partitioning helps to alleviate overflow/out of memory exceptions by efficiently segmenting files\n                    into smaller chunks that then can be merged if needs be.\n\n--filterSystemTemplates\n                    Whether to remove metrics-*-* and logs-*-* system templates\n                    (default: true])\n\n--force-os-version\n                    Forces the OpenSearch version used by elasticsearch-dump.\n                    (default: 7.10.2)\n\n--fsCompress\n                    gzip data before sending output to file.\n                    On import the command is used to inflate a gzipped file\n                    \n--compressionLevel\n                    The level of zlib compression to apply to responses.\n                    defaults to zlib.Z_DEFAULT_COMPRESSION\n\n--handleVersion\n                    Tells elastisearch transport to handle the `_version` field if present in the dataset\n                    (default : false)\n\n--headers\n                    Add custom headers to Elastisearch requests (helpful when\n                    your Elasticsearch instance sits behind a proxy)\n                    (default: '{&quot;User-Agent&quot;: &quot;elasticdump&quot;}')\n                    Type/direction based headers are supported .i.e. input-headers/output-headers\n                    (these will only be added based on the current flow type input/output)\n\n--help\n                    This page\n\n--ignore-errors\n                    Will continue the read/write loop on write error\n                    (default: false)\n\n--ignore-es-write-errors\n                    Will continue the read/write loop on a write error from elasticsearch\n                    (default: true)\n\n--inputSocksPort, --outputSocksPort\n                    Socks5 host port\n\n--inputSocksProxy, --outputSocksProxy\n                    Socks5 host address\n\n--inputTransport\n                    Provide a custom js file to use as the input transport\n\n--key, --input-key, --output-key\n                    Private key file. Use --key if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--limit\n                    How many objects to move in batch per operation\n                    limit is approximate for file streams\n                    (default: 100)\n\n--maxRows\n                    supports file splitting.  Files are split by the number of rows specified\n\n--maxSockets\n                    How many simultaneous HTTP requests can the process make?\n                    (default:\n                      5 [node &lt;= v0.10.x] /\n                      Infinity [node &gt;= v0.11.x] )\n\n--noRefresh\n                    Disable input index refresh.\n                    Positive:\n                      1. Much increased index speed\n                      2. Much less hardware requirements\n                    Negative:\n                      1. Recently added data may not be indexed\n                    Recommended using with big data indexing,\n                    where speed and system health is a higher priority\n                    than recently added data.\n\n--offset\n                    Integer containing the number of rows you wish to skip\n                    ahead from the input transport.  When importing a large\n                    index, things can go wrong, be it connectivity, crashes,\n                    someone forgets to `screen`, etc.  This allows you\n                    to start the dump again from the last known line written\n                    (as logged by the `offset` in the output).  Please be\n                    advised that since no sorting is specified when the\n                    dump is initially created, there's no real way to\n                    guarantee that the skipped rows have already been\n                    written/parsed.  This is more of an option for when\n                    you want to get as much data as possible in the index\n                    without concern for losing some rows in the process,\n                    similar to the `timeout` option.\n                    (default: 0)\n\n--outputTransport\n                    Provide a custom js file to use as the output transport\n\n--overwrite\n                    Overwrite output file if it exists\n                    (default: false)\n\n--params\n                    Add custom parameters to Elastisearch requests uri. Helpful when you for example\n                    want to use elasticsearch preference\n                    --input-params is a specific params extension that can be used when fetching data with the scroll api\n                    --output-params is a specific params extension that can be used when indexing data with the bulk index api\n                    NB : These were added to avoid param pollution problems which occur when an input param is used in an output source\n                    (default: null)\n\n--parseExtraFields\n                    Comma-separated list of meta-fields to be parsed\n\n--pass, --input-pass, --output-pass\n                    Pass phrase for the private key. Use --pass if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--quiet\n                    Suppress all messages except for errors\n                    (default: false)\n\n--retryAttempts\n                    Integer indicating the number of times a request should be automatically re-attempted before failing\n                    when a connection fails with one of the following errors `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`,\n                    ETIMEDOUT`, `ECONNREFUSED`, `EHOSTUNREACH`, `EPIPE`, `EAI_AGAIN`\n                    (default: 0)\n\n--retryDelay\n                    Integer indicating the back-off/break period between retry attempts (milliseconds)\n                    (default : 5000)\n\n--retryDelayBase\n                    The base number of milliseconds to use in the exponential backoff for operation retries. (s3)\n\n--scroll-with-post\n                    Use a HTTP POST method to perform scrolling instead of the default GET\n                    (default: false)\n\n--scrollId\n                    The last scroll Id returned from elasticsearch.\n                    This will allow dumps to be resumed used the last scroll Id &amp;\n                    `scrollTime` has not expired.\n\n--scrollTime\n                    Time the nodes will hold the requested search in order.\n                    (default: 10m)\n\n--searchBody\n                    Preform a partial extract based on search results\n                    when ES is the input, default values are\n                      if ES &gt; 5\n                        `'{&quot;query&quot;: { &quot;match_all&quot;: {} }, &quot;stored_fields&quot;: [&quot;*&quot;], &quot;_source&quot;: true }'`\n                      else\n                        `'{&quot;query&quot;: { &quot;match_all&quot;: {} }, &quot;fields&quot;: [&quot;*&quot;], &quot;_source&quot;: true }'`\n                    [As of 6.68.0] If the searchBody is preceded by a @ symbol, elasticdump will perform a file lookup\n                    in the location specified. NB: File must contain valid JSON\n\n--searchBodyTemplate\n                    A method/function which can be called to the searchBody\n                        doc.searchBody = { query: { match_all: {} }, stored_fields: [], _source: true };\n                    May be used multiple times.\n                    Additionally, searchBodyTemplate may be performed by a module. See [searchBody Template](#search-template) below.\n\n--searchWithTemplate\n                    Enable to use Search Template when using --searchBody\n                    If using Search Template then searchBody has to consist of &quot;id&quot; field and &quot;params&quot; objects\n                    If &quot;size&quot; field is defined within Search Template, it will be overridden by --size parameter\n                    See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html for\n                    further information\n                    (default: false)\n\n--size\n                    How many objects to retrieve\n                    (default: -1 -&gt; no limit)\n\n--skip-existing\n                    Skips resource_already_exists_exception when enabled and exit with success\n                    (default: false)\n\n--sourceOnly\n                    Output only the json contained within the document _source\n                    Normal: {&quot;_index&quot;:&quot;&quot;,&quot;_type&quot;:&quot;&quot;,&quot;_id&quot;:&quot;&quot;, &quot;_source&quot;:{SOURCE}}\n                    sourceOnly: {SOURCE}\n                    (default: false)\n\n--support-big-int\n                    Support big integer numbers\n\n--templateRegex\n                    Regex used to filter templates before passing to the output transport\n                    (default: ((metrics|logs|\\..+)(-.+)?)\n\n--timeout\n                    Integer containing the number of milliseconds to wait for\n                    a request to respond before aborting the request. Passed\n                    directly to the request library. Mostly used when you don't\n                    care too much if you lose some data when importing\n                    but would rather have speed.\n\n--tlsAuth\n                    Enable TLS X509 client authentication\n\n--toLog\n                    When using a custom outputTransport, should log lines\n                    be appended to the output stream?\n                    (default: true, except for `$`)\n\n--transform\n                    A method/function which can be called to modify documents\n                    before writing to a destination. A global variable 'doc'\n                    is available.\n                    Example script for computing a new field 'f2' as doubled\n                    value of field 'f1':\n                        doc._source[&quot;f2&quot;] = doc._source.f1 * 2;\n                    May be used multiple times.\n                    Additionally, transform may be performed by a module. See [Module Transform](#module-transform) below.\n\n--type\n                    What are we exporting?\n                    (default: data, options: [index, settings, analyzer, data, mapping, policy, alias, template, component_template, index_template])\n\n--versionType\n                    Elasticsearch versioning types. Should be `internal`, `external`, `external_gte`, `force`.\n                    NB : Type validation is handled by the bulk endpoint and not by elasticsearch-dump\n\n--openSearchServerless\n                    Set to true to run dump from AWS OpenSearch serverless collection.\n                    (default : false)\n\n--searchAfter\n                    Set to true to use dump with Elasticsearch search_after. Requires ES version 7.17.0 or higher\n                    (default: false)\n\n--pit               \n                    Set to true to enabled PIT (Point in time support). Please READ the documentation for the requirements on how to use this\n                    (default : false)\n--pitKeepAlive      \n                    Set the keepAlive time for the pit\n                    (default : 5m)\n--heapSnapshot      \n                    Set to true to enable a snapshot to be taken. This is for debugging purposes ONLY ! requires node &gt;12\n                    (default : false)\n\nAWS specific options\n--------------------\n--awsAccessKeyId and --awsSecretAccessKey\n                    When using Amazon Elasticsearch Service protected by\n                    AWS Identity and Access Management (IAM), provide\n                    your Access Key ID and Secret Access Key.\n                    --sessionToken can also be optionally provided if using temporary credentials\n\n--awsChain\n                    Use [standard](https://aws.amazon.com/blogs/security/a-new-and-standardized-way-to-manage-credentials-in-the-aws-sdks/)\n                    location and ordering for resolving credentials including environment variables,\n                    config files, EC2 and ECS metadata locations _Recommended option for use with AWS_\n\n--awsIniFileName\n                    Override the default aws ini file name when using --awsIniFileProfile\n                    Filename is relative to ~/.aws/\n                    (default: config)\n\n--awsIniFileProfile\n                    Alternative to --awsAccessKeyId and --awsSecretAccessKey,\n                    loads credentials from a specified profile in aws ini file.\n                    For greater flexibility, consider using --awsChain\n                    and setting AWS_PROFILE and AWS_CONFIG_FILE\n                    environment variables to override defaults if needed\n\n--awsRegion\n                    Sets the AWS region that the signature will be generated for\n                    (default: calculated from hostname or host)\n\n--awsService\n                    Sets the AWS service that the signature will be generated for\n                    (default: calculated from hostname or host)\n\n--awsUrlRegex\n                    Overrides the default regular expression that is used to validate AWS urls that should be signed\n                    (default: ^https?:\\/\\/.*\\.amazonaws\\.com.*$)\n\n--s3ACL\n                    S3 ACL: private | public-read | public-read-write | authenticated-read | aws-exec-read |\n                    bucket-owner-read | bucket-owner-full-control [default private]\n\n--s3AccessKeyId\n                    AWS access key ID\n\n--s3SessionToken\n                    AWS session token in case of using temporary credentials\n\n--s3Compress\n                    gzip data before sending to s3\n\n--s3Configs\n                    Set all s3 constructor configurations\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--s3Endpoint\n                    AWS endpoint that can be used for AWS compatible backends such as\n                    OpenStack Swift and OpenStack Ceph\n\n--s3ForcePathStyle\n                    Force path style URLs for S3 objects [default false]\n\n--s3Options\n                    Set all s3 parameters shown here https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#createMultipartUpload-property\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--s3Region\n                    AWS region\n\n--s3SSEKMSKeyId\n                    KMS Id to be used with aws:kms uploads\n\n--s3SSLEnabled\n                    Use SSL to connect to AWS [default true]\n\n--s3SecretAccessKey\n                    AWS secret access key\n\n--s3ServerSideEncryption\n                    Enables encrypted uploads\n\n--s3StorageClass\n                    Set the Storage Class used for s3\n                    (default: STANDARD)\"><pre class=\"notranslate\"><code class=\"notranslate\">elasticdump: Import and export tools for elasticsearch\nversion: %%version%%\n\nUsage: elasticdump --input SOURCE --output DESTINATION [OPTIONS]\n\nCore options\n--------------------\n--input\n                    Source location (required)\n\n--input-index\n                    Source index and type\n                    (default: all, example: index/type)\n\n--output\n                    Destination location (required)\n\n--output-index\n                    Destination index and type\n                    (default: all, example: index/type)\n\n\nOptions\n--------------------\n--big-int-fields\n                    Specifies a comma-seperated list of fields that should be checked for big-int support\n                    (default '')\n\n--bulkAction\n                    Sets the operation type to be used when preparing the request body to be sent to elastic search.\n                    For more info - https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html\n                    (default: index, options: [index, update, delete, create)\n\n--ca, --input-ca, --output-ca\n                    CA certificate. Use --ca if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--cert, --input-cert, --output-cert\n                    Client certificate file. Use --cert if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--csvConfigs\n                    Set all fast-csv configurations\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--csvCustomHeaders  A comma-seperated listed of values that will be used as headers for your data. This param must\n                    be used in conjunction with `csvRenameHeaders`\n                    (default : null)\n\n--csvDelimiter\n                    The delimiter that will separate columns.\n                    (default : ',')\n\n--csvFirstRowAsHeaders\n                    If set to true the first row will be treated as the headers.\n                    (default : true)\n\n--csvHandleNestedData\n                    Set to true to handle nested JSON/CSV data.\n                    NB : This is a very opinionated implementaton !\n                    (default : false)\n\n--csvIdColumn\n                    Name of the column to extract the record identifier (id) from\n                    When exporting to CSV this column can be used to override the default id (@id) column name\n                    (default : null)\n\n--csvIgnoreAutoColumns\n                    Set to true to prevent the following columns @id, @index, @type from being written to the output file\n                    (default : false)\n\n--csvIgnoreEmpty\n                    Set to true to ignore empty rows.\n                    (default : false)\n\n--csvIncludeEndRowDelimiter\n                    Set to true to include a row delimiter at the end of the csv\n                    (default : false)\n\n--csvIndexColumn\n                    Name of the column to extract the record index from\n                    When exporting to CSV this column can be used to override the default index (@index) column name\n                    (default : null)\n\n--csvLTrim\n                    Set to true to left trim all columns.\n                    (default : false)\n\n--csvMaxRows\n                    If number is &gt; 0 then only the specified number of rows will be parsed.(e.g. 100 would return the first 100 rows of data)\n                    (default : 0)\n\n--csvRTrim\n                    Set to true to right trim all columns.\n                    (default : false)\n\n--csvRenameHeaders\n                    If you want the first line of the file to be removed and replaced by the one provided in the `csvCustomHeaders` option\n                    (default : true)\n\n--csvSkipLines\n                    If number is &gt; 0 the specified number of lines will be skipped.\n                    (default : 0)\n\n--csvSkipRows\n                    If number is &gt; 0 then the specified number of parsed rows will be skipped\n                    NB:  (If the first row is treated as headers, they aren't a part of the count)\n                    (default : 0)\n\n--csvTrim\n                    Set to true to trim all white space from columns.\n                    (default : false)\n\n--csvTypeColumn\n                    Name of the column to extract the record type from\n                    When exporting to CSV this column can be used to override the default type (@type) column name\n                    (default : null)\n\n--csvWriteHeaders   Determines if headers should be written to the csv file.\n                    (default : true)\n\n--customBackoff\n                    Activate custom customBackoff function. (s3)\n\n--debug\n                    Display the elasticsearch commands being used\n                    (default: false)\n\n--delete\n                    Delete documents one-by-one from the input as they are\n                    moved.  Will not delete the source index\n                    (default: false)\n\n--delete-with-routing\n                    Passes the routing query-param to the delete function\n                    used to route operations to a specific shard.\n                    (default: false)\n\n--esCompress\n                    if true, add an Accept-Encoding header to request compressed content encodings from the server (if not already present)\n                    and decode supported content encodings in the response.\n                    Note: Automatic decoding of the response content is performed on the body data returned through request\n                    (both through the request stream and passed to the callback function) but is not performed on the response stream\n                    (available from the response event) which is the unmodified http.IncomingMessage object which may contain compressed data.\n                    See example below.\n\n--fileSize\n                    supports file splitting.  This value must be a string supported by the **bytes** module.\n                    The following abbreviations must be used to signify size in terms of units\n                    b for bytes\n                    kb for kilobytes\n                    mb for megabytes\n                    gb for gigabytes\n                    tb for terabytes\n                    e.g. 10mb / 1gb / 1tb\n                    Partitioning helps to alleviate overflow/out of memory exceptions by efficiently segmenting files\n                    into smaller chunks that then can be merged if needs be.\n\n--filterSystemTemplates\n                    Whether to remove metrics-*-* and logs-*-* system templates\n                    (default: true])\n\n--force-os-version\n                    Forces the OpenSearch version used by elasticsearch-dump.\n                    (default: 7.10.2)\n\n--fsCompress\n                    gzip data before sending output to file.\n                    On import the command is used to inflate a gzipped file\n                    \n--compressionLevel\n                    The level of zlib compression to apply to responses.\n                    defaults to zlib.Z_DEFAULT_COMPRESSION\n\n--handleVersion\n                    Tells elastisearch transport to handle the `_version` field if present in the dataset\n                    (default : false)\n\n--headers\n                    Add custom headers to Elastisearch requests (helpful when\n                    your Elasticsearch instance sits behind a proxy)\n                    (default: '{\"User-Agent\": \"elasticdump\"}')\n                    Type/direction based headers are supported .i.e. input-headers/output-headers\n                    (these will only be added based on the current flow type input/output)\n\n--help\n                    This page\n\n--ignore-errors\n                    Will continue the read/write loop on write error\n                    (default: false)\n\n--ignore-es-write-errors\n                    Will continue the read/write loop on a write error from elasticsearch\n                    (default: true)\n\n--inputSocksPort, --outputSocksPort\n                    Socks5 host port\n\n--inputSocksProxy, --outputSocksProxy\n                    Socks5 host address\n\n--inputTransport\n                    Provide a custom js file to use as the input transport\n\n--key, --input-key, --output-key\n                    Private key file. Use --key if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--limit\n                    How many objects to move in batch per operation\n                    limit is approximate for file streams\n                    (default: 100)\n\n--maxRows\n                    supports file splitting.  Files are split by the number of rows specified\n\n--maxSockets\n                    How many simultaneous HTTP requests can the process make?\n                    (default:\n                      5 [node &lt;= v0.10.x] /\n                      Infinity [node &gt;= v0.11.x] )\n\n--noRefresh\n                    Disable input index refresh.\n                    Positive:\n                      1. Much increased index speed\n                      2. Much less hardware requirements\n                    Negative:\n                      1. Recently added data may not be indexed\n                    Recommended using with big data indexing,\n                    where speed and system health is a higher priority\n                    than recently added data.\n\n--offset\n                    Integer containing the number of rows you wish to skip\n                    ahead from the input transport.  When importing a large\n                    index, things can go wrong, be it connectivity, crashes,\n                    someone forgets to `screen`, etc.  This allows you\n                    to start the dump again from the last known line written\n                    (as logged by the `offset` in the output).  Please be\n                    advised that since no sorting is specified when the\n                    dump is initially created, there's no real way to\n                    guarantee that the skipped rows have already been\n                    written/parsed.  This is more of an option for when\n                    you want to get as much data as possible in the index\n                    without concern for losing some rows in the process,\n                    similar to the `timeout` option.\n                    (default: 0)\n\n--outputTransport\n                    Provide a custom js file to use as the output transport\n\n--overwrite\n                    Overwrite output file if it exists\n                    (default: false)\n\n--params\n                    Add custom parameters to Elastisearch requests uri. Helpful when you for example\n                    want to use elasticsearch preference\n                    --input-params is a specific params extension that can be used when fetching data with the scroll api\n                    --output-params is a specific params extension that can be used when indexing data with the bulk index api\n                    NB : These were added to avoid param pollution problems which occur when an input param is used in an output source\n                    (default: null)\n\n--parseExtraFields\n                    Comma-separated list of meta-fields to be parsed\n\n--pass, --input-pass, --output-pass\n                    Pass phrase for the private key. Use --pass if source and destination are identical.\n                    Otherwise, use the one prefixed with --input or --output as needed.\n\n--quiet\n                    Suppress all messages except for errors\n                    (default: false)\n\n--retryAttempts\n                    Integer indicating the number of times a request should be automatically re-attempted before failing\n                    when a connection fails with one of the following errors `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`,\n                    ETIMEDOUT`, `ECONNREFUSED`, `EHOSTUNREACH`, `EPIPE`, `EAI_AGAIN`\n                    (default: 0)\n\n--retryDelay\n                    Integer indicating the back-off/break period between retry attempts (milliseconds)\n                    (default : 5000)\n\n--retryDelayBase\n                    The base number of milliseconds to use in the exponential backoff for operation retries. (s3)\n\n--scroll-with-post\n                    Use a HTTP POST method to perform scrolling instead of the default GET\n                    (default: false)\n\n--scrollId\n                    The last scroll Id returned from elasticsearch.\n                    This will allow dumps to be resumed used the last scroll Id &amp;\n                    `scrollTime` has not expired.\n\n--scrollTime\n                    Time the nodes will hold the requested search in order.\n                    (default: 10m)\n\n--searchBody\n                    Preform a partial extract based on search results\n                    when ES is the input, default values are\n                      if ES &gt; 5\n                        `'{\"query\": { \"match_all\": {} }, \"stored_fields\": [\"*\"], \"_source\": true }'`\n                      else\n                        `'{\"query\": { \"match_all\": {} }, \"fields\": [\"*\"], \"_source\": true }'`\n                    [As of 6.68.0] If the searchBody is preceded by a @ symbol, elasticdump will perform a file lookup\n                    in the location specified. NB: File must contain valid JSON\n\n--searchBodyTemplate\n                    A method/function which can be called to the searchBody\n                        doc.searchBody = { query: { match_all: {} }, stored_fields: [], _source: true };\n                    May be used multiple times.\n                    Additionally, searchBodyTemplate may be performed by a module. See [searchBody Template](#search-template) below.\n\n--searchWithTemplate\n                    Enable to use Search Template when using --searchBody\n                    If using Search Template then searchBody has to consist of \"id\" field and \"params\" objects\n                    If \"size\" field is defined within Search Template, it will be overridden by --size parameter\n                    See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html for\n                    further information\n                    (default: false)\n\n--size\n                    How many objects to retrieve\n                    (default: -1 -&gt; no limit)\n\n--skip-existing\n                    Skips resource_already_exists_exception when enabled and exit with success\n                    (default: false)\n\n--sourceOnly\n                    Output only the json contained within the document _source\n                    Normal: {\"_index\":\"\",\"_type\":\"\",\"_id\":\"\", \"_source\":{SOURCE}}\n                    sourceOnly: {SOURCE}\n                    (default: false)\n\n--support-big-int\n                    Support big integer numbers\n\n--templateRegex\n                    Regex used to filter templates before passing to the output transport\n                    (default: ((metrics|logs|\\..+)(-.+)?)\n\n--timeout\n                    Integer containing the number of milliseconds to wait for\n                    a request to respond before aborting the request. Passed\n                    directly to the request library. Mostly used when you don't\n                    care too much if you lose some data when importing\n                    but would rather have speed.\n\n--tlsAuth\n                    Enable TLS X509 client authentication\n\n--toLog\n                    When using a custom outputTransport, should log lines\n                    be appended to the output stream?\n                    (default: true, except for `$`)\n\n--transform\n                    A method/function which can be called to modify documents\n                    before writing to a destination. A global variable 'doc'\n                    is available.\n                    Example script for computing a new field 'f2' as doubled\n                    value of field 'f1':\n                        doc._source[\"f2\"] = doc._source.f1 * 2;\n                    May be used multiple times.\n                    Additionally, transform may be performed by a module. See [Module Transform](#module-transform) below.\n\n--type\n                    What are we exporting?\n                    (default: data, options: [index, settings, analyzer, data, mapping, policy, alias, template, component_template, index_template])\n\n--versionType\n                    Elasticsearch versioning types. Should be `internal`, `external`, `external_gte`, `force`.\n                    NB : Type validation is handled by the bulk endpoint and not by elasticsearch-dump\n\n--openSearchServerless\n                    Set to true to run dump from AWS OpenSearch serverless collection.\n                    (default : false)\n\n--searchAfter\n                    Set to true to use dump with Elasticsearch search_after. Requires ES version 7.17.0 or higher\n                    (default: false)\n\n--pit               \n                    Set to true to enabled PIT (Point in time support). Please READ the documentation for the requirements on how to use this\n                    (default : false)\n--pitKeepAlive      \n                    Set the keepAlive time for the pit\n                    (default : 5m)\n--heapSnapshot      \n                    Set to true to enable a snapshot to be taken. This is for debugging purposes ONLY ! requires node &gt;12\n                    (default : false)\n\nAWS specific options\n--------------------\n--awsAccessKeyId and --awsSecretAccessKey\n                    When using Amazon Elasticsearch Service protected by\n                    AWS Identity and Access Management (IAM), provide\n                    your Access Key ID and Secret Access Key.\n                    --sessionToken can also be optionally provided if using temporary credentials\n\n--awsChain\n                    Use [standard](https://aws.amazon.com/blogs/security/a-new-and-standardized-way-to-manage-credentials-in-the-aws-sdks/)\n                    location and ordering for resolving credentials including environment variables,\n                    config files, EC2 and ECS metadata locations _Recommended option for use with AWS_\n\n--awsIniFileName\n                    Override the default aws ini file name when using --awsIniFileProfile\n                    Filename is relative to ~/.aws/\n                    (default: config)\n\n--awsIniFileProfile\n                    Alternative to --awsAccessKeyId and --awsSecretAccessKey,\n                    loads credentials from a specified profile in aws ini file.\n                    For greater flexibility, consider using --awsChain\n                    and setting AWS_PROFILE and AWS_CONFIG_FILE\n                    environment variables to override defaults if needed\n\n--awsRegion\n                    Sets the AWS region that the signature will be generated for\n                    (default: calculated from hostname or host)\n\n--awsService\n                    Sets the AWS service that the signature will be generated for\n                    (default: calculated from hostname or host)\n\n--awsUrlRegex\n                    Overrides the default regular expression that is used to validate AWS urls that should be signed\n                    (default: ^https?:\\/\\/.*\\.amazonaws\\.com.*$)\n\n--s3ACL\n                    S3 ACL: private | public-read | public-read-write | authenticated-read | aws-exec-read |\n                    bucket-owner-read | bucket-owner-full-control [default private]\n\n--s3AccessKeyId\n                    AWS access key ID\n\n--s3SessionToken\n                    AWS session token in case of using temporary credentials\n\n--s3Compress\n                    gzip data before sending to s3\n\n--s3Configs\n                    Set all s3 constructor configurations\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--s3Endpoint\n                    AWS endpoint that can be used for AWS compatible backends such as\n                    OpenStack Swift and OpenStack Ceph\n\n--s3ForcePathStyle\n                    Force path style URLs for S3 objects [default false]\n\n--s3Options\n                    Set all s3 parameters shown here https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#createMultipartUpload-property\n                    A escaped JSON string or file can be supplied. File location must be prefixed with the @ symbol\n                    (default: null)\n\n--s3Region\n                    AWS region\n\n--s3SSEKMSKeyId\n                    KMS Id to be used with aws:kms uploads\n\n--s3SSLEnabled\n                    Use SSL to connect to AWS [default true]\n\n--s3SecretAccessKey\n                    AWS secret access key\n\n--s3ServerSideEncryption\n                    Enables encrypted uploads\n\n--s3StorageClass\n                    Set the Storage Class used for s3\n                    (default: STANDARD)\n</code></pre></div>\n<h2 dir=\"auto\">Elasticsearch's Scroll API</h2>\n<p dir=\"auto\">Elasticsearch provides a <a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html\" rel=\"nofollow\">scroll</a> API to fetch all documents of an index starting from (and keeping) a consistent snapshot in time, which we use under the hood.  This method is safe to use for large exports since it will maintain the result set in cache for the given period of time.</p>\n<p dir=\"auto\">NOTE: only works for <code class=\"notranslate\">--output</code></p>\n<h2 dir=\"auto\">Bypassing self-sign certificate errors</h2>\n<p dir=\"auto\">Set the environment <code class=\"notranslate\">NODE_TLS_REJECT_UNAUTHORIZED=0</code> before running elasticdump</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# An alternative method of passing environment variables before execution\n# NB : This only works with linux shells\nNODE_TLS_REJECT_UNAUTHORIZED=0 elasticdump --input=&quot;https://localhost:9200&quot; --output myfile\"><pre class=\"notranslate\"><span class=\"pl-c\"><span class=\"pl-c\">#</span> An alternative method of passing environment variables before execution</span>\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> NB : This only works with linux shells</span>\nNODE_TLS_REJECT_UNAUTHORIZED=0 elasticdump --input=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>https://localhost:9200<span class=\"pl-pds\">\"</span></span> --output myfile</pre></div>\n<h2 dir=\"auto\">MultiElasticDump</h2>\n<p dir=\"auto\">This package also ships with a second binary, <code class=\"notranslate\">multielasticdump</code>.  This is a wrapper for the normal elasticdump binary, which provides a limited option set, but will run elasticdump in parallel across many indexes at once. It runs a process which forks into <code class=\"notranslate\">n</code> (default your running host's # of CPUs) subprocesses running elasticdump.</p>\n<p dir=\"auto\">The limited option set includes:</p>\n<ul dir=\"auto\">\n<li><code class=\"notranslate\">parallel</code>:   <code class=\"notranslate\">os.cpus()</code>,</li>\n<li><code class=\"notranslate\">match</code>:      <code class=\"notranslate\">'^.*$'</code>,</li>\n<li><code class=\"notranslate\">matchType</code>:      <code class=\"notranslate\">alias</code>,</li>\n<li><code class=\"notranslate\">order</code>:      <code class=\"notranslate\">'asc'</code>,</li>\n<li><code class=\"notranslate\">input</code>:      <code class=\"notranslate\">null</code>,</li>\n<li><code class=\"notranslate\">output</code>:     <code class=\"notranslate\">null</code>,</li>\n<li><code class=\"notranslate\">scrollTime</code>: <code class=\"notranslate\">'10m'</code>,</li>\n<li><code class=\"notranslate\">timeout</code>: <code class=\"notranslate\">null</code>,</li>\n<li><code class=\"notranslate\">limit</code>:      <code class=\"notranslate\">100</code>,</li>\n<li><code class=\"notranslate\">offset</code>:     <code class=\"notranslate\">0</code>,</li>\n<li><code class=\"notranslate\">size</code>:       <code class=\"notranslate\">-1</code>,</li>\n<li><code class=\"notranslate\">direction</code>:   <code class=\"notranslate\">dump</code>,</li>\n<li><code class=\"notranslate\">ignoreType</code>:   ``</li>\n<li><code class=\"notranslate\">includeType</code>:   ``</li>\n<li><code class=\"notranslate\">prefix</code>:   <code class=\"notranslate\">'''</code></li>\n<li><code class=\"notranslate\">suffix</code>:   <code class=\"notranslate\">''</code></li>\n<li><code class=\"notranslate\">interval</code>:     <code class=\"notranslate\">1000</code></li>\n<li><code class=\"notranslate\">searchBody</code>: <code class=\"notranslate\">null</code></li>\n<li><code class=\"notranslate\">transform</code>: <code class=\"notranslate\">null</code></li>\n<li><code class=\"notranslate\">support-big-int</code>: <code class=\"notranslate\">false</code></li>\n<li><code class=\"notranslate\">big-int-fields</code>: ``</li>\n<li><code class=\"notranslate\">ignoreChildError</code>: <code class=\"notranslate\">false</code></li>\n</ul>\n<p dir=\"auto\">If the <code class=\"notranslate\">--direction</code> is <code class=\"notranslate\">dump</code>, which is the default, <code class=\"notranslate\">--input</code> MUST be a URL for the base location of an ElasticSearch server (i.e. <code class=\"notranslate\">http://localhost:9200</code>) and <code class=\"notranslate\">--output</code> MUST be a directory. Each index that does match will have a data, mapping, and analyzer file created.</p>\n<p dir=\"auto\">For loading files that you have dumped from multi-elasticsearch, <code class=\"notranslate\">--direction</code> should be set to <code class=\"notranslate\">load</code>, <code class=\"notranslate\">--input</code> MUST be a directory of a multielasticsearch dump and <code class=\"notranslate\">--output</code> MUST be a Elasticsearch server URL.</p>\n<p dir=\"auto\"><code class=\"notranslate\">--parallel</code> is how many forks should be run simultaneously and <code class=\"notranslate\">--match</code> is used to filter which indexes should be dumped/loaded (regex).</p>\n<p dir=\"auto\"><code class=\"notranslate\">--ignoreType</code> allows a type to be ignored from the dump/load. Six options are supported. <code class=\"notranslate\">data,mapping,analyzer,alias,settings,template</code>. Multi-type support is available, when used each type must be comma(,)-separated<br>\nand <code class=\"notranslate\">interval</code> allows control over the interval for spawning a dump/load for a new index. For small indices this can be set to <code class=\"notranslate\">0</code> to reduce delays and optimize performance<br>\ni.e analyzer,alias types are ignored by default</p>\n<p dir=\"auto\"><code class=\"notranslate\">--includeType</code> allows a type to be included in the dump/load. Six options are supported - <code class=\"notranslate\">data,mapping,analyzer,alias,settings,template</code>.</p>\n<p dir=\"auto\"><code class=\"notranslate\">--ignoreChildError</code> allows multi-elasticdump to continue if a child throws an error.</p>\n<p dir=\"auto\"><code class=\"notranslate\">--matchType</code>  allows multi-elasticdump to fetch indices from the specified elasticsearch endpoint. Two options are supported - <code class=\"notranslate\">alias,datastream</code></p>\n<p dir=\"auto\">New options, <code class=\"notranslate\">--suffix</code> allows you to add a suffix to the index name being created e.g. <code class=\"notranslate\">es6-${index}</code> and<br>\n<code class=\"notranslate\">--prefix</code> allows you to add a prefix to the index name e.g. <code class=\"notranslate\">${index}-backup-2018-03-13</code>.<br>\n<code class=\"notranslate\">--order</code> accepts <code class=\"notranslate\">asc</code> or <code class=\"notranslate\">desc</code> and allows the indexes/aliases to be sorted before processing is performed</p>\n<h2 dir=\"auto\">Usage Examples</h2>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# backup ES indices &amp; all their type to the es_backup folder\nmultielasticdump \\\n  --direction=dump \\\n  --match='^.*$' \\\n  --input=http://production.es.com:9200 \\\n  --output=/tmp/es_backup\n\n# Only backup ES indices ending with a prefix of `-index` (match regex). \n# Only the indices data will be backed up. All other types are ignored.\n# NB: analyzer &amp; alias types are ignored by default\nmultielasticdump \\\n  --direction=dump \\\n  --match='^.*-index$'\\\n  --input=http://production.es.com:9200 \\\n  --ignoreType='mapping,settings,template' \\\n  --output=/tmp/es_backup\"><pre class=\"notranslate\"><span class=\"pl-c\"><span class=\"pl-c\">#</span> backup ES indices &amp; all their type to the es_backup folder</span>\nmultielasticdump \\\n  --direction=dump \\\n  --match=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>^.*$<span class=\"pl-pds\">'</span></span> \\\n  --input=http://production.es.com:9200 \\\n  --output=/tmp/es_backup\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Only backup ES indices ending with a prefix of `-index` (match regex). </span>\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> Only the indices data will be backed up. All other types are ignored.</span>\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> NB: analyzer &amp; alias types are ignored by default</span>\nmultielasticdump \\\n  --direction=dump \\\n  --match=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>^.*-index$<span class=\"pl-pds\">'</span></span>\\\n  --input=http://production.es.com:9200 \\\n  --ignoreType=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>mapping,settings,template<span class=\"pl-pds\">'</span></span> \\\n  --output=/tmp/es_backup</pre></div>\n<h2 dir=\"auto\">Custom Matcher - MultiElasticDump</h2>\n<p dir=\"auto\">The default matcher for <code class=\"notranslate\">multielasticdump</code> is regex based and won't handle complex conditions or business rules.<br>\nSupport was added for defining custom matchers.</p>\n<p dir=\"auto\">When specifying the <code class=\"notranslate\">customMatcher</code> option, prefix the value with <code class=\"notranslate\">@</code> (a curl convention) to load matcher file</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"multielasticdump \\\n --direction=dump \\\n --customMatcher='@./customMatcher/backup.js'\\\n --input=http://production.es.com:9200 \\\n --ignoreType='mapping,settings,template' \\\n --output=/tmp/es_backup\"><pre class=\"notranslate\">multielasticdump \\\n --direction=dump \\\n --customMatcher=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>@./customMatcher/backup.js<span class=\"pl-pds\">'</span></span>\\\n --input=http://production.es.com:9200 \\\n --ignoreType=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>mapping,settings,template<span class=\"pl-pds\">'</span></span> \\\n --output=/tmp/es_backup</pre></div>\n<p dir=\"auto\">The only requirement for this module is that it must define a test function.</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"module.exports = {\n  test: function (indexName) {\n    // determine if the index should be loaded/dumped.\n    // must return a boolen(true/false)\n  }\n};\"><pre class=\"notranslate\"><span class=\"pl-smi\">module</span><span class=\"pl-kos\">.</span><span class=\"pl-c1\">exports</span> <span class=\"pl-c1\">=</span> <span class=\"pl-kos\">{</span>\n  <span class=\"pl-en\">test</span>: <span class=\"pl-k\">function</span> <span class=\"pl-kos\">(</span><span class=\"pl-s1\">indexName</span><span class=\"pl-kos\">)</span> <span class=\"pl-kos\">{</span>\n    <span class=\"pl-c\">// determine if the index should be loaded/dumped.</span>\n    <span class=\"pl-c\">// must return a boolen(true/false)</span>\n  <span class=\"pl-kos\">}</span>\n<span class=\"pl-kos\">}</span><span class=\"pl-kos\">;</span></pre></div>\n<h2 dir=\"auto\">Module Transform</h2>\n<p dir=\"auto\">When specifying the <code class=\"notranslate\">transform</code> option, prefix the value with <code class=\"notranslate\">@</code> (a curl convention) to load the top-level function which is called with the document and the parsed arguments to the module.</p>\n<p dir=\"auto\">Uses a pseudo-URL format to specify arguments to the module as follows. Given:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"elasticdump --transform='@./transforms/my-transform?param1=value&amp;param2=another-value'\"><pre class=\"notranslate\">elasticdump --transform=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>@./transforms/my-transform?param1=value&amp;param2=another-value<span class=\"pl-pds\">'</span></span></pre></div>\n<p dir=\"auto\">with a module at <code class=\"notranslate\">./transforms/my-transform.js</code> with the following:</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"module.exports = function(doc, options) {\n  // do something to doc\n};\"><pre class=\"notranslate\"><span class=\"pl-smi\">module</span><span class=\"pl-kos\">.</span><span class=\"pl-en\">exports</span> <span class=\"pl-c1\">=</span> <span class=\"pl-k\">function</span><span class=\"pl-kos\">(</span><span class=\"pl-s1\">doc</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">options</span><span class=\"pl-kos\">)</span> <span class=\"pl-kos\">{</span>\n  <span class=\"pl-c\">// do something to doc</span>\n<span class=\"pl-kos\">}</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">will load module <code class=\"notranslate\">./transforms/my-transform.js</code>, and execute the function with <code class=\"notranslate\">doc</code> and <code class=\"notranslate\">options</code> = <code class=\"notranslate\">{\"param1\": \"value\", \"param2\": \"another-value\"}</code>.</p>\n<p dir=\"auto\">An example transform for anonymizing data on-the-fly can be found in the <code class=\"notranslate\">transforms</code> folder.</p>\n<h2 dir=\"auto\">searchBody Template</h2>\n<p dir=\"auto\">When specifying the <code class=\"notranslate\">searchBodyTemplate</code> option, prefix the value with <code class=\"notranslate\">@</code> (a curl convention) to load the top-level function which is called with the document and the parsed arguments to the module.</p>\n<p dir=\"auto\">Uses a pseudo-URL format to specify arguments to the module as follows. Given:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"elasticdump --searchBodyTemplate='@./templates/my-template?param1=value&amp;param2=another-value'\"><pre class=\"notranslate\">elasticdump --searchBodyTemplate=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>@./templates/my-template?param1=value&amp;param2=another-value<span class=\"pl-pds\">'</span></span></pre></div>\n<p dir=\"auto\">with a module at <code class=\"notranslate\">./transforms/my-transform.js</code> with the following:</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"module.exports = function(doc, options) {\n  // result must be added to doc.searchBody\n  doc.searchBody = {}\n};\"><pre class=\"notranslate\"><span class=\"pl-smi\">module</span><span class=\"pl-kos\">.</span><span class=\"pl-en\">exports</span> <span class=\"pl-c1\">=</span> <span class=\"pl-k\">function</span><span class=\"pl-kos\">(</span><span class=\"pl-s1\">doc</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">options</span><span class=\"pl-kos\">)</span> <span class=\"pl-kos\">{</span>\n  <span class=\"pl-c\">// result must be added to doc.searchBody</span>\n  <span class=\"pl-s1\">doc</span><span class=\"pl-kos\">.</span><span class=\"pl-c1\">searchBody</span> <span class=\"pl-c1\">=</span> <span class=\"pl-kos\">{</span><span class=\"pl-kos\">}</span>\n<span class=\"pl-kos\">}</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">will load module <code class=\"notranslate\">./templates/my-template.js', and execute the function with </code>doc<code class=\"notranslate\">and</code>options<code class=\"notranslate\">=</code>{\"param1\": \"value\", \"param2\": \"another-value\"}`.</p>\n<p dir=\"auto\">An example template for modifying dates using a simple templating engine is available in the <code class=\"notranslate\">templates</code> folder.</p>\n<h2 dir=\"auto\">How Elasticdump handles Nested Data in CSV</h2>\n<p dir=\"auto\">Elasticdump is capable of reading/writing nested data, but in an <em>_opinionated way</em>. This is to reduce complexity while parsing/saving CSVs<br>\nThe format flattens all nesting to a single level (an example of this is shown below)</p>\n<div class=\"highlight highlight-source-json notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"{\n   &quot;elasticdump&quot;:{\n      &quot;version&quot;:&quot;6.51.0&quot;,\n      &quot;formats&quot;:[\n         &quot;json&quot;,\n         &quot;csv&quot;\n      ]\n   },\n   &quot;contributors&quot;:[\n      {\n         &quot;name&quot;:&quot;ferron&quot;,\n         &quot;id&quot;:3\n      }\n   ],\n   &quot;year&quot;:112\n}\"><pre class=\"notranslate\">{\n   <span class=\"pl-ent\">\"elasticdump\"</span>:{\n      <span class=\"pl-ent\">\"version\"</span>:<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>6.51.0<span class=\"pl-pds\">\"</span></span>,\n      <span class=\"pl-ent\">\"formats\"</span>:[\n         <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>json<span class=\"pl-pds\">\"</span></span>,\n         <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>csv<span class=\"pl-pds\">\"</span></span>\n      ]\n   },\n   <span class=\"pl-ent\">\"contributors\"</span>:[\n      {\n         <span class=\"pl-ent\">\"name\"</span>:<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>ferron<span class=\"pl-pds\">\"</span></span>,\n         <span class=\"pl-ent\">\"id\"</span>:<span class=\"pl-c1\">3</span>\n      }\n   ],\n   <span class=\"pl-ent\">\"year\"</span>:<span class=\"pl-c1\">112</span>\n}</pre></div>\n<p dir=\"auto\">Output format</p>\n<div class=\"highlight highlight-source-json notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"{\n  &quot;elasticdump&quot;:&quot;{\\&quot;version\\&quot;:\\&quot;6.51.0\\&quot;,\\&quot;formats\\&quot;:[\\&quot;json\\&quot;,\\&quot;csv\\&quot;]}&quot;,\n  &quot;contributors&quot;:&quot;{\\&quot;contributors\\&quot;:[{\\&quot;name\\&quot;:\\&quot;ferron\\&quot;,\\&quot;id\\&quot;:3}]}&quot;,\n  &quot;year&quot;:2020\n}\"><pre class=\"notranslate\">{\n  <span class=\"pl-ent\">\"elasticdump\"</span>:<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>{<span class=\"pl-cce\">\\\"</span>version<span class=\"pl-cce\">\\\"</span>:<span class=\"pl-cce\">\\\"</span>6.51.0<span class=\"pl-cce\">\\\"</span>,<span class=\"pl-cce\">\\\"</span>formats<span class=\"pl-cce\">\\\"</span>:[<span class=\"pl-cce\">\\\"</span>json<span class=\"pl-cce\">\\\"</span>,<span class=\"pl-cce\">\\\"</span>csv<span class=\"pl-cce\">\\\"</span>]}<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"contributors\"</span>:<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>{<span class=\"pl-cce\">\\\"</span>contributors<span class=\"pl-cce\">\\\"</span>:[{<span class=\"pl-cce\">\\\"</span>name<span class=\"pl-cce\">\\\"</span>:<span class=\"pl-cce\">\\\"</span>ferron<span class=\"pl-cce\">\\\"</span>,<span class=\"pl-cce\">\\\"</span>id<span class=\"pl-cce\">\\\"</span>:3}]}<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"year\"</span>:<span class=\"pl-c1\">2020</span>\n}</pre></div>\n<p dir=\"auto\"><strong>Notice that the data is flattened to 1 level</strong>. Object keys are used for headers and values as row data.<br>\nThis might not work with existing nested data formats, but that's the format that was chosen for <code class=\"notranslate\">elasticdump</code><br>\nbecause of its simplicity. This detection is disabled by default, to enable use the <code class=\"notranslate\">--csvHandleNestedData</code> flag</p>\n<h2 dir=\"auto\">Notes</h2>\n<ul dir=\"auto\">\n<li>This tool is likely to require Elasticsearch version 1.0.0 or higher</li>\n<li>Elasticdump (and Elasticsearch in general) will create indices if they don't exist upon import</li>\n<li>When exporting from elasticsearch, you can export an entire index (<code class=\"notranslate\">--input=\"http://localhost:9200/index\"</code>) or a type of object from that index (<code class=\"notranslate\">--input=\"http://localhost:9200/index/type\"</code>). This requires ElasticSearch 1.2.0 or higher</li>\n<li>If the path to our elasticsearch installation is in a sub-directory, the index and type must be provided with a separate argument (<code class=\"notranslate\">--input=\"http://localhost:9200/sub/directory --input-index=index/type\"</code>).Using <code class=\"notranslate\">--input-index=/</code> will include all indices and types.</li>\n<li>We can use the <code class=\"notranslate\">put</code> method to write objects.  This means new objects will be created and old objects with the same ID be updated</li>\n<li>The <code class=\"notranslate\">file</code> transport will not overwrite any existing files by default, it will throw an exception if the file already exists. You can make use of <code class=\"notranslate\">--overwrite</code> instead.</li>\n<li>If you need basic http auth, you can use it like this: <code class=\"notranslate\">--input=http://name:password@production.es.com:9200/my_index</code> or by setting the <code class=\"notranslate\">ELASTICDUMP_INPUT_USERNAME</code> and <code class=\"notranslate\">ELASTICDUMP_INPUT_PASSWORD</code> environment variables. For output URLs, <code class=\"notranslate\">ELASTICDUMP_OUTPUT_USERNAME</code> and <code class=\"notranslate\">ELASTICDUMP_OUTPUT_PASSWORD</code> may be used.</li>\n<li>If you choose a stdio output (<code class=\"notranslate\">--output=$</code>), you can also request a more human-readable output with <code class=\"notranslate\">--format=human</code></li>\n<li>If you choose a stdio output (<code class=\"notranslate\">--output=$</code>), all logging output will be suppressed</li>\n<li>If you are using Elasticsearch version 6.0.0 or higher the <code class=\"notranslate\">offset</code> parameter is no longer allowed in the scrollContext</li>\n<li>ES 6.x.x &amp; higher no longer support the <code class=\"notranslate\">template</code> property for <code class=\"notranslate\">_template</code>. All templates prior to ES 6.0 has to be upgraded to use <code class=\"notranslate\">index_patterns</code></li>\n<li>ES 7.x.x &amp; higher no longer supports <code class=\"notranslate\">type</code> property. All templates prior to ES 6.0 has to be upgraded to remove the type property</li>\n<li>ES 5.x.x ignores offset (from) parameter in the search body. All records will be returned</li>\n<li>ES 6.x.x <a href=\"https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes-6.0.html#_scroll\" rel=\"nofollow\">from</a> parameter can no longer be used in the search request body when initiating a scroll</li>\n<li>Index templates has been deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</li>\n<li>Ensure JSON in the searchBody properly escaped to avoid parsing issues : <a href=\"https://www.freeformatter.com/json-escape.html\" rel=\"nofollow\">https://www.freeformatter.com/json-escape.html</a></li>\n<li>Dropped support for Node.JS 8 in Elasticdump v6.32.0. Node.JS 10+ is now required.</li>\n<li>Elasticdump v6.42.0 added support for CSV import/export using the <a href=\"https://c2fo.io/fast-csv/\" rel=\"nofollow\">fast-csv</a> library</li>\n<li>Elasticdump v6.68.0 added support for specifying a file containing the searchBody</li>\n<li>Elasticdump v6.85.0 added support for ignoring auto columns in CSV</li>\n<li>Elasticdump v6.86.0 added support for searchBodyTemplate which allows the searchBody to be transformed</li>\n<li>Elasticdump v6.110.1 added support for AWS OpenSearch serverless collection. Note: by default, <a href=\"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-genref.html#serverless-operations\" rel=\"nofollow\">AWS OpenSearch serverless does not support <code class=\"notranslate\">/_search?scroll</code> API and PUT <code class=\"notranslate\">_bulk</code></a>. As a workaround, the dump is implemented using <code class=\"notranslate\">_search</code> and POST <code class=\"notranslate\">_bulk</code> API only. This may affect the performance of the dump.</li>\n<li>Elasticdump v6.112.0 added support for setting gzip compression level</li>\n<li>Elasticdump v6.115.0 added support for custom matchers</li>\n<li>Elasticdump v6.117.0 added support for elasticsearch search_after and pit</li>\n</ul>\n<h2 dir=\"auto\">Articles on Elasticdump</h2>\n<ul dir=\"auto\">\n<li><a href=\"https://blog.logrocket.com/a-practical-guide-to-working-with-elasticdump/\" rel=\"nofollow\">A practical Guide to working with Elasticdump</a></li>\n<li><a href=\"https://apassionatechie.wordpress.com/2019/07/03/moving-elasticsearch-indexes-with-elasticdump/\" rel=\"nofollow\">Moving Elasticsearch Indexes with Elasticdump</a></li>\n<li><a href=\"https://stackabuse.com/guide-to-elasticdump-moving-and-saving-elasticsearch-indices/\" rel=\"nofollow\">Guide to Elasticdump - Moving and Saving Elasticsearch Indices</a></li>\n<li><a href=\"https://www.alibabacloud.com/help/en/elasticsearch/latest/elasticsearch-dump-use\" rel=\"nofollow\">Use elasticsearch-dump to migrate data</a></li>\n</ul>\n<p dir=\"auto\">Inspired by <a href=\"https://github.com/crate/elasticsearch-inout-plugin\">https://github.com/crate/elasticsearch-inout-plugin</a> and <a href=\"https://github.com/jprante/elasticsearch-knapsack\">https://github.com/jprante/elasticsearch-knapsack</a></p>","updatedAt":"2025-05-21T15:56:40Z","upvoteCount":null,"author":{"login":"eryajf","avatarUrl":"https://avatars.githubusercontent.com/u/33259379?u=e4a4090a38ac2473aaed4ef9945233636776c6c3&v=4","url":"https://github.com/eryajf"},"category":null,"labels":{"edges":[{"node":{"name":"更多","color":"25B472"}},{"node":{"name":"ElasticSearch-Manage","color":"6b7852"}},{"node":{"name":"elasticsearch-dump","color":"0c8879"}}]},"comments":{"edges":[]}}},"pageContext":{"number":151,"previous":{"title":"anjia0532/elastalert-docker: ES 告警组件 ElastAlert 的 Docker镜像","number":150},"next":{"title":"1340691923/ElasticView: 一个简单好用的 ElasticSearch 可视化客户端，支持连接6，7，8版本的ES","number":152}}},
    "staticQueryHashes": ["151096407","2861350382"]}