how can backup the _template with snapshot and restore.
i don't know how can do it.
thanks..
Template are stored in the cluster state. So if you save the cluster state as well, it should be ok.
like this
curl -XGET 'http://xx.xxx.xxx.xx:9200/_template' >> templatebackup.json
restore curl -XPUT templatebackup.json ?
@dadoonet
Here: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html#_snapshot
Look at include_global_state
this is about one of templates? how save all template about the cluster
how i can backup and restore this url http://xx.xxx.xxx.xxx:9200/_template use snapshot and restore
this is my backup data directory
-rw-r--r-- 1 es es 29 Nov 23 15:25 incompatible-snapshots
-rw-r--r-- 1 es es 183 Nov 23 15:24 index-0
-rw-r--r-- 1 es es 347 Nov 23 16:48 index-1
-rw-r--r-- 1 es es 8 Nov 23 16:48 index.latest
drwxr-xr-x 4 es es 66 Nov 23 16:48 indices
-rw-r--r-- 1 es es 6079 Nov 23 15:24 meta--2icUpA1TnmusIZ3tUWeNQ.dat
-rw-r--r-- 1 es es 6080 Nov 23 16:48 meta-BBuJk4B5QPyu7Nz2g0Xvsw.dat
-rw-r--r-- 1 es es 224 Nov 23 15:24 snap--2icUpA1TnmusIZ3tUWeNQ.dat
-rw-r--r-- 1 es es 228 Nov 23 16:48 snap-BBuJk4B5QPyu7Nz2g0Xvsw.dat
i wan't know how i can know the template is backup.
which file to find it .
@dadoonet
thanks so much.
sorrty i see it . include_global_state ture
it save the template.
i will test it in es 5.6.3
thanks.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.