我想使用弹性转储将弹性索引数据加载到json中

问题描述 投票:0回答:1

我计划使用弹性转储将弹性索引数据加载到json文件中我的密码有双引号,它被加注但没有结束我试图转义它“\方式但它不起作用。

我已经全局安装了elasticdump模块: “npm 安装elasticdump -g”

NODE_TLS_REJECT_UNAUTHORIZED=0 
elasticdump \
--input=https://elastic:4erw"x25{67@localhost:9200/employee \
--output=./data/sample_file.json \
--type=data

错误:

bash: @localhost:9200/employee: No such file or directory
Fri, 05 Apr 2024 09:25:07 GMT | Error Emitted => {"errors":["`output` is a required input"]}

which elasticdump

~/.nvm/versions/node/v15.0.1/bin/elasticdump

i have tried by adding this path still not working 

elasticsearch elastic-stack
1个回答
0
投票

您的弹性密码

4erw"x25{67
有特殊字符。这会在
curl
请求期间引起问题。对密码进行编码并重试。

您可以使用在线ASCII编码器网站进行转换。

您可以在以下链接中参考并生成编码密码。 https://www.w3schools.com/tags/ref_urlencode.ASP

查看以下链接是否有类似案例。 如何解决使用elasticdump时格式错误的URI?

© www.soinside.com 2019 - 2024. All rights reserved.