# Snapshot elasticsearch with rsync

**URL:** <https://discuss.elastic.co/t/snapshot-elasticsearch-with-rsync/251033>\
**Category:** Elasticsearch\
**Created:** [October 5, 2020, 5:37pm UTC](https://discuss.elastic.co/t/snapshot-elasticsearch-with-rsync/251033 "2020-10-05T17:37:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrezenzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrezenzen/32/76681_2.png) [@andrezenzen](https://discuss.elastic.co/u/andrezenzen)\
**Post date:** [October 5, 2020, 5:37pm UTC](https://discuss.elastic.co/t/snapshot-elasticsearch-with-rsync/251033/1 "2020-10-05T17:37:18Z")

</div>

I have a backup routine set up, and would like to use rsync to make a copy to another server. My question is whether rsync will be able to move without breaking files with the routine enabled.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 5, 2020, 7:14pm UTC](https://discuss.elastic.co/t/snapshot-elasticsearch-with-rsync/251033/2 "2020-10-05T19:14:05Z")

</div>

Taking backups via file system snapshots is not supported and will most likely not work unless you are on an old version (?). Instead use the snapshot and restore APIs.

---

<div class="post-metadata">

**Author:** ![andrezenzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrezenzen/32/76681_2.png) [@andrezenzen](https://discuss.elastic.co/u/andrezenzen)\
**Post date:** [October 5, 2020, 8:26pm UTC](https://discuss.elastic.co/t/snapshot-elasticsearch-with-rsync/251033/3 "2020-10-05T20:26:41Z")

</div>

I'm using Elasticsearch 6.8 where I have a routine that generates snapshot daily. If you use rsync to move the snapshot and start taking another snapshot while rsync is active, won't rsync corrupt the files or will it work properly?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [October 5, 2020, 9:06pm UTC](https://discuss.elastic.co/t/snapshot-elasticsearch-with-rsync/251033/4 "2020-10-05T21:06:59Z")

</div>

Copying a snapshot repo won't reliably work if done concurrently with taking another snapshot -- snapshots comprise multiple files and files are shared between multiple snapshots so it's very likely you'll end up missing some vital files.

See [https://github.com/elastic/elasticsearch/issues/54944](https://github.com/elastic/elasticsearch/issues/54944) for a possible solution to this, but that's not something that's being worked on at the moment.

---

<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:** [November 2, 2020, 9:07pm UTC](https://discuss.elastic.co/t/snapshot-elasticsearch-with-rsync/251033/5 "2020-11-02T21:07:15Z")

</div>

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