SEANK.H.LIAO

migrating elasticcloud clusters

moving an elastic cluster

elasticsearch cloud

Say you need to move elastic deployments, maybe because you don't like being charged by credit card and would prefer to pay through invoiced billing accounts in google cloud. Who cares that it's a little more expensive.

Anyway, you don't care that much about the data (it'll all be gone after 2 weeks retention has passed), but you do want to move your index(-patterns), dashboards, and users over. What do you do?

elasticdump

elasticdump is a tool for moving indices, and what do you know, index-patterns and users are stored as indices.

 1# index patterns
 2docker run --rm -it elasticdump/elasticsearch-dump \
 3  --input=https://user:password@old-url/.kibana \
 4  --output=https://user:password@new-url/.kibana \
 5  --type=data
 6
 7# roles/users
 8docker run --rm -it elasticdump/elasticsearch-dump \
 9  --input=https://user:password@old-url/.security \
10  --output=https://user:password@new-url/.security \
11  --type=data

dashboards

Somewhere in settings, "Saved Objects", export as json and import it.