The wait_for_completion flag has to be specified on URL not in the body. Try this:
curl -XPUT " http://localhost:9200/_snapshot/backup/snapshot_kibana?wait_for_completion=true&pretty<http://localhost:9200/_snapshot/backup/snapshot_kibana?pretty>" -d '{ "indices": "kibana-int", "ignore_unavailable": true, "include_global_state": false }' On Wednesday, April 2, 2014 9:43:14 AM UTC-4, Robin Clarke wrote: > > I am writing a small script to create a snapshot of my kibana-int index, > and hit an odd race condition. > > I delete the old snapshot if it exists: > curl -XDELETE ' > http://localhost:9200/_snapshot/backup/snapshot_kibana?pretty' > > Then make the new snapshot > curl -XPUT "http://localhost:9200/_snapshot/backup/snapshot_kibana?pretty" > -d '{ > "indices": "kibana-int", > "ignore_unavailable": true, > "wait_for_completion": true, > "include_global_state": false > }' > > Then create a tarball of the backup to transfer to another machine > tar czf /DATA/elasticsearch/kibana-int.tgz -C /DATA/elasticsearch ./backup > > When scripted, it seems that the DELETE, and/or PUT are not complete, and > I get this error: > tar: ./backup/indices/kibana-int/4: file changed as we read it > tar: ./backup/indices/kibana-int/2: file changed as we read it > tar: ./backup/indices/kibana-int/3: file changed as we read it > > I tried putting a sleep between the DELETE and the PUT, and same error, so > it seems that perhaps the "wait_for_completion" is not doing what it > should...? > > Any ideas, other than just putting a sleep in there? > > Cheers! > > -Robin- > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/beb0d9d0-73ef-4ce1-8e1f-c70e083d65d5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
