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/7962b247-f4d1-47d3-9e73-25544ff7aa84%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
