# Copy daily indices with new mappings

**URL:** <https://discuss.elastic.co/t/copy-daily-indices-with-new-mappings/130212>\
**Category:** Elasticsearch\
**Created:** [May 2, 2018, 9:02am UTC](https://discuss.elastic.co/t/copy-daily-indices-with-new-mappings/130212 "2018-05-02T09:02:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvj](https://avatars.discourse-cdn.com/v4/letter/c/3da27b/32.png) [@cvj](https://discuss.elastic.co/u/cvj)\
**Post date:** [May 2, 2018, 9:02am UTC](https://discuss.elastic.co/t/copy-daily-indices-with-new-mappings/130212/1 "2018-05-02T09:02:08Z")

</div>

Hi,

I'm trying to reindex my data using the \_reindex feature.

Prior to this I wan't to create the daily indices with new mappings.

How can I automatically extract the current daily name, add \_v2 to the name and add a new mapping for each of the indices?

One of the old indices and mapping:  
{  
"sipdump-2018-04-30": {  
"aliases": {},  
"mappings": {  
"Info": {  
"properties": {  
"from\_server": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
}  
}  
}  
}  
}  
}

What I'm trying to accomplish:  
{  
"sipdump\_v2-2018-04-30": {  
"aliases": {},  
"mappings": {  
"Info": {  
"properties": {  
"from\_server": {  
"type": "ip"  
}  
}  
}  
}  
}  
}

/CJ

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 30, 2018, 9:04am UTC](https://discuss.elastic.co/t/copy-daily-indices-with-new-mappings/130212/2 "2018-05-30T09:04:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
