I have an old project which uses Elastic Search version 5.5. The problem we are facing right now is that ES eats up huge amount of storage at a faster rate. I checked into the server and confirmed that the data in /var/data/elasticsearch is really really huge (like 900GB).
I also noticed that in that directory are a bunch of snapshots and meta files (meta-xxxx.dat, snap-xxx.dat).
Browsing the web, it was mentioned that these are snapshots and backup files that elasticsearch generate automatically. As there is very limited resource available online to learn how to delete or at least reduce it, I am shooting my queries here instead.
- Is it safe to delete these files (meta-xxx.dat & snap-xxx.dat)?
- Is there a way to delete these the "elasticsearch way"?
- What are the consequences of deleting these?
Thank you in advance!
CodePudding user response:
DO NOT delete any files directly from the filesystem, it's likely to cause major issues with Elasticsearch and your data. you should be able to see, and manage snapshots via the applicable api (the GET _snapshot
part) - https://www.elastic.co/guide/en/elasticsearch/reference/5.5/modules-snapshots.html#_snapshot
deleting snapshots, via the api, will delete the underlying files and free up disk space
also 5.5 is long EOL and you should look to upgrade asap. there's been tonnes of improvements around storage efficiencies in later versions