# Drop some field when we restore

**URL:** <https://discuss.elastic.co/t/drop-some-field-when-we-restore/291915>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [December 15, 2021, 7:59am UTC](https://discuss.elastic.co/t/drop-some-field-when-we-restore/291915 "2021-12-15T07:59:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kannan\_raj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kannan_raj/32/63201_2.png) [@kannan\_raj](https://discuss.elastic.co/u/kannan_raj)\
**Post date:** [December 15, 2021, 7:59am UTC](https://discuss.elastic.co/t/drop-some-field-when-we-restore/291915/1 "2021-12-15T07:59:52Z")

</div>

Hi Team,

Is it possible to remove some fields while restoring indices from snapshots?

Ex: let's assume the doc in the index and take the snapshot

```auto
{
    "foo": "bar",
    "bar": "foo"
}

```

Here would like to remove the field foo and index rest of the field while restoring.

```auto
{
    "bar": "foo"
}

```

we have to remove some sensitive fields when we restore the production into dev.

Regards  
Kannan P

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2021, 2:37pm UTC](https://discuss.elastic.co/t/drop-some-field-when-we-restore/291915/2 "2021-12-15T14:37:38Z")

</div>

It's not possible.

You need to reindex for that.

You can use the reindex API to read from an index, write the content to another index and apply an ingest pipeline which will remove the field you don't need anymore.

If you have a commercial license, you can do the read part from a snapshot, without needing to restore it, using searchable snapshots. See [Searchable snapshots | Elasticsearch Guide [7.16] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots.html#searchable-snapshot-mount-storage-options)

---

<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:** [January 12, 2022, 2:38pm UTC](https://discuss.elastic.co/t/drop-some-field-when-we-restore/291915/3 "2022-01-12T14:38:14Z")

</div>

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