# Mapping for Bytes/percentage in kibana

**URL:** <https://discuss.elastic.co/t/mapping-for-bytes-percentage-in-kibana/97637>\
**Category:** Kibana\
**Created:** [August 18, 2017, 9:15pm UTC](https://discuss.elastic.co/t/mapping-for-bytes-percentage-in-kibana/97637 "2017-08-18T21:15:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randude/32/34911_2.png) [@randude](https://discuss.elastic.co/u/randude)\
**Post date:** [August 18, 2017, 9:15pm UTC](https://discuss.elastic.co/t/mapping-for-bytes-percentage-in-kibana/97637/1 "2017-08-18T21:15:18Z")

</div>

Hi,  
Is there a way to define automatically the format for some fields via a custom mapping?  
I’m talking about the BYTES or Percentage format.  
I dont want each time to manually set the mapping on a new installed elasticsearch index/machine.

In other words - I want to be able to import my mapping into kibana and have it with the special percentage/bytes format for some fields.

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [August 18, 2017, 10:37pm UTC](https://discuss.elastic.co/t/mapping-for-bytes-percentage-in-kibana/97637/2 "2017-08-18T22:37:34Z")

</div>

The field formats are part of the Index Pattern documents in the `.kibana` index. Most of the time, saved objects in Kibana can be exported to a backup and then re-imported to restore the backup, but unfortunately, Index Pattern objects are not exported. There is an open issue in Github on this: [https://github.com/elastic/kibana/issues/4288](https://github.com/elastic/kibana/issues/4288)

The alternative to using exported saved objects is to create a snapshot that includes your `.kibana` index. This is done using Elasticsearch APIs: [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html)

If you make a snapshot of your `.kibana` index, then you can restore that into newly installed clusters, and then you'll be able to preserve all index patterns and their formatted fields.

Hope that helps!

---

<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:** [September 15, 2017, 10:38pm UTC](https://discuss.elastic.co/t/mapping-for-bytes-percentage-in-kibana/97637/3 "2017-09-15T22:38:33Z")

</div>

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