# Is it possible to have elastic search index documents in 2 locations?

**URL:** https://discuss.elastic.co/t/is-it-possible-to-have-elastic-search-index-documents-in-2-locations/106350
**Category:** Elasticsearch
**Created:** [November 3, 2017, 5:25pm UTC](https://discuss.elastic.co/t/is-it-possible-to-have-elastic-search-index-documents-in-2-locations/106350 "2017-11-03T17:25:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nsur1](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@nsur1](https://discuss.elastic.co/u/nsur1)
#### Post date: [November 3, 2017, 5:25pm UTC](https://discuss.elastic.co/t/is-it-possible-to-have-elastic-search-index-documents-in-2-locations/106350/1 "2017-11-03T17:25:52Z")

</div>

I want to know if it is possible for elasticsearch to index documents into 2 directories. One for me to use, and then another as a backup. I want to create a mirror of all the indices as a backup.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [November 3, 2017, 6:16pm UTC](https://discuss.elastic.co/t/is-it-possible-to-have-elastic-search-index-documents-in-2-locations/106350/2 "2017-11-03T18:16:37Z")

</div>

It depends on exactly you mean by backup. 🙂

If you have multiple ES servers then the default configuration has a replica for each shard. This protects you against a single machine failure -- the replica shard is promoted and continues providing service, and if another server is available a new replica is spun up on it.

If you are running on a single server and want to backup and restore data then [snapshot](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html) might be what you are looking for.

---

<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: [December 1, 2017, 6:16pm UTC](https://discuss.elastic.co/t/is-it-possible-to-have-elastic-search-index-documents-in-2-locations/106350/3 "2017-12-01T18:16:42Z")

</div>

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