[es] Adding CLUSTER_FROM feature for migrating cluster data directories

This commit is contained in:
Geoff Bourne 2015-07-24 12:49:57 -04:00
parent 53932e64f2
commit 7f048c5e8b

View File

@ -20,6 +20,12 @@ OPTS="-Des.path.conf=/conf \
if [ -n "$CLUSTER" ]; then
OPTS="$OPTS -Des.cluster.name=$CLUSTER"
if [ -n "$CLUSTER_FROM" ]; then
if [ -d /data/$CLUSTER_FROM -a ! -d /data/$CLUSTER ]; then
echo "Performing cluster data migration from $CLUSTER_FROM to $CLUSTER"
mv /data/$CLUSTER_FROM /data/$CLUSTER
fi
fi
fi
if [ -n "$NODE_NAME" ]; then