# How to reimport logs after deleting them with XDELETE?

**URL:** <https://discuss.elastic.co/t/how-to-reimport-logs-after-deleting-them-with-xdelete/57195>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 4, 2016, 9:02am UTC](https://discuss.elastic.co/t/how-to-reimport-logs-after-deleting-them-with-xdelete/57195 "2016-08-04T09:02:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gisamark](https://avatars.discourse-cdn.com/v4/letter/g/c0e974/32.png) [@Gisamark](https://discuss.elastic.co/u/Gisamark)\
**Post date:** [August 4, 2016, 9:02am UTC](https://discuss.elastic.co/t/how-to-reimport-logs-after-deleting-them-with-xdelete/57195/1 "2016-08-04T09:02:21Z")

</div>

My config is :

- ELK server
- Filebeat server

I made tests with old logs and wanted to delete them all by doing `sudo curl -XDELETE localhost:9200/index` on the ELK server. It works fine.

But now, I want to reimport these old logs and I don't know how to do that.

I tried to delete the registry file in `/var/lib/filebeat/` and restart Filebeat but it didn't' work.

Any idea on how to import these logs again ?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [August 4, 2016, 3:27pm UTC](https://discuss.elastic.co/t/how-to-reimport-logs-after-deleting-them-with-xdelete/57195/2 "2016-08-04T15:27:23Z")

</div>

The only persistent state kept by Filebeat is the registry file. The location of the registry file is determined by your configuration file. So confirm that your configuration file has the registry located at `/var/lib/filebeat/registry`. If that's correct, stop the Filebeat service, delete the registry file, then start the Filebeat service.

If that doesn't work, then check the logs to see if there are any errors indexing.

---

<div class="post-metadata">

**Author:** ![Gisamark](https://avatars.discourse-cdn.com/v4/letter/g/c0e974/32.png) [@Gisamark](https://discuss.elastic.co/u/Gisamark)\
**Post date:** [August 11, 2016, 8:14am UTC](https://discuss.elastic.co/t/how-to-reimport-logs-after-deleting-them-with-xdelete/57195/4 "2016-08-11T08:14:10Z")

</div>

Sorry for the delay.

It's OK, thank you.

---

<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:** [August 25, 2016, 9:02am UTC](https://discuss.elastic.co/t/how-to-reimport-logs-after-deleting-them-with-xdelete/57195/5 "2016-08-25T09:02:32Z")

</div>

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