How can I list only the location of all snapshots?
I tried:
curl -q -XPOST -H "Content-Type: application/json" -u elastic:mypassword "https://10.0.0.1:9200/_snapshot/_all " -d '{
"_source": ["location"],
"query" : {
"exists": {
"field": "location"
}
}
}'
and any other, but I didn't get results. Normally 400 error, or body problems.
OK I found something by myself.
curl -s -XGET -H "Content-Type: application/json" -u elastic:mypassword "http://10.0.0.1:9200/_snapshot/_all "|python -c 'import sys, json; print json.load(sys.stdin)["repositoryname"]["settings"]["location"]'
Thank to all visitors of this post
system
(system)
Closed
February 14, 2019, 5:30pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.