我试图在shell中运行multiline curl命令但无法运行它
curl -XPUT 'elk.***.com:9200/_snapshot/my_backup' \
{
"type": "fs",
"settings": {
"location": "/elkprod_bak/elkback",
"compress": true
}
}
答案 0 :(得分:0)
您需要在命令行中使用-d
switch,如下所示:
curl -XPUT 'elk.***.com:9200/_snapshot/my_backup' -d '{
"type": "fs",
"settings": {
"location": "/elkprod_bak/elkback",
"compress": true
}
}'