How about closing index before moving files? Does it fit your need?
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-open-close.html
meilian zhu於 2014年4月28日星期一UTC+8下午5時44分27秒寫道:
>
> my local disk is very small,just can store one day index files.So i wanted
> to move
Basically you can't do with no stop at all. ES holds indexes open so that
it can access the data quickly. You could close the index, copy the data
and then open the index again but it is probably best to stop es, move the
data, change the data path and then start es again. You can have multiple
my local disk is very small,just can store one day index files.So i wanted
to move my index file to another fs path.
This is my sh.It excute everyday.
#!/bin/bash
#copy the index files form elasticsearch to clusterFS now
ddate=`date -d "1 days ago" +%Y.%m.%d`
clustername="mams_online_log"
indexdir