# Files vanishing during backups

**URL:** <https://discuss.elastic.co/t/files-vanishing-during-backups/10494>\
**Category:** Elasticsearch\
**Created:** [January 24, 2013, 4:34pm UTC](https://discuss.elastic.co/t/files-vanishing-during-backups/10494 "2013-01-24T16:34:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maf/32/77965_2.png) [@maf](https://discuss.elastic.co/u/maf)\
**Post date:** [January 24, 2013, 4:34pm UTC](https://discuss.elastic.co/t/files-vanishing-during-backups/10494/1 "2013-01-24T16:34:56Z")

</div>

I am trying to create a backup script for our Elasticsearch clusters. We  
are running on Amazon SSD machines so EBS snapshots are not an option.  
Instead I am trying to go the rsync route.

My problem is that rsync complains about files vanishing while it is  
syncing (in the CLUSTER\_NAME/nodes/0/indices/INDEX\_NAME/SHARD/index  
directory). I am disabling flush and running a manual flush before I launch  
the rsync.

I assume that is this is due to segments being merged. But I assumed that  
would not happen since I have disabled flush (at least it looks like I  
have). Or may it be that the merge is already in progress when I disabled  
flush? Can I see if it is merging any segments?

Alternatively is there some other way this could be happening?

```
/MaF

```

--

---

<div class="post-metadata">

**Author:** ![maf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maf/32/77965_2.png) [@maf](https://discuss.elastic.co/u/maf)\
**Post date:** [January 24, 2013, 5:03pm UTC](https://discuss.elastic.co/t/files-vanishing-during-backups/10494/2 "2013-01-24T17:03:50Z")

</div>

A quick follow up to myself. I added code to my script which prints the  
total number of flush and merge operations (from the \_nodes/stats API). I  
print these values after I have disabled flush and the again after rsync  
has failed (but before I enable flush). The result is that the flush.total  
is constant but the merges.total counter has increased.

--

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 27, 2013, 10:15am UTC](https://discuss.elastic.co/t/files-vanishing-during-backups/10494/3 "2013-01-27T10:15:24Z")

</div>

Yes, merges might still happen behind the scene (they might also be ongoing). This might add some files from the index directory, but there won't be a new "commit" point in Lucene, so its ok to copy over the files even if they "change".

On Jan 24, 2013, at 6:03 PM, [maf@recordedfuture.com](mailto:maf@recordedfuture.com) wrote:

> A quick follow up to myself. I added code to my script which prints the total number of flush and merge operations (from the \_nodes/stats API). I print these values after I have disabled flush and the again after rsync has failed (but before I enable flush). The result is that the flush.total is constant but the merges.total counter has increased.
> 
> --

---

<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:** [July 6, 2017, 2:54am UTC](https://discuss.elastic.co/t/files-vanishing-during-backups/10494/4 "2017-07-06T02:54:28Z")

</div>

Closed on July 6, 2017, 2:54am UTC


