# How does Filebeat handle log rotation

**URL:** https://discuss.elastic.co/t/how-does-filebeat-handle-log-rotation/64959
**Category:** Beats
**Tags:** filebeat
**Created:** [November 3, 2016, 11:22pm UTC](https://discuss.elastic.co/t/how-does-filebeat-handle-log-rotation/64959 "2016-11-03T23:22:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DK\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dk_3/32/48003_2.png) [@DK\_3](https://discuss.elastic.co/u/DK_3)
#### Post date: [November 3, 2016, 11:22pm UTC](https://discuss.elastic.co/t/how-does-filebeat-handle-log-rotation/64959/1 "2016-11-03T23:22:17Z")

</div>

How does Filebeat handle log rotation

For example when app.log rolls over to app.1.log.  
Does it know to ignore app.1.log since it was already shipped?

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [November 4, 2016, 7:36am UTC](https://discuss.elastic.co/t/how-does-filebeat-handle-log-rotation/64959/2 "2016-11-04T07:36:13Z")

</div>

Filebeat tracks files based on inode and device. As long as these stay the same during renaming, filebeat will know that the data is already shipped.

---

<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 24, 2016, 11:22pm UTC](https://discuss.elastic.co/t/how-does-filebeat-handle-log-rotation/64959/3 "2016-11-24T23:22:17Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
