Indexes (and thus data) gone after ES upgrade

Hi all,

I've updated my systems through sudo apt-get upgrade / update and my elasticsearch got updated with it as well.
However after updating the necessary plug-ins I saw my data was gone as well. Is this expected?
Should I always back-up my data before upgrading/updating? I'm talking about a small update here, it went from 2.3.2 to 2.3.3 ... Any best practises on this part?

Not expected at all.

May be the config dir or data dir changed?

1 Like

Hi @dadoonet,

thanks for the reply.

I'm not sure what happened, I installed it (iirc) through apt-get, all of my directories are where they are expected to be (/usr/share/... config in /etc/elasticsearch). After the update however I got the message that my config was wrong, es.default.config was no longer used. However in my config file, that line was nowhere to be found. ( I had the same issue, but the cause was not that related. So when I fixed that, my data was gone. Now that I'm typing this could it be I have two installations of elasticsearch somehow? How could I find out? Perhaps one got updated and started, while I was working with a different binary all along?

Thanks in advance!

This message about es.default.config makes me think that the service script was not updated or is something different than the one we provide.

But I'm not expert on that field so can't really comment.

Your data is probably still living somewhere on the disk but in another dir.
Using the default elasticsearch cluster name (because it did not find the config dir) instead the one you set.

Not related as my case is on Centos, however did same update recently and I can assure you all of 2TB I had there was intact.

Thanks guys! The data is then probably still living somewhere :slight_smile:
It was only a staging server and I had data dumps of the json in there so I' m ok, but was worried when this might happen on a production server.

Perhaps a DevOps question, how can I make sure not to update my ES installation when I perform an apt-upgrade or an equivalent in CentOS? My libraries are built on a specific version of the API of ES, just updating it, even in a minor version number might be a potential case for unwanted errors?

To be 100% sure I would simply remove the repo definition. Add back when needed, upgrade, remove again.

That's what I was thinking, however I'm not a DevOps person so it's best to ask and learn. Thanks for replying!

Well, you can also try repo manager which can disable repos :wink: