Hello team I have a quick question. If I re-install my elasticsearch cluster via apt like this:
sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" elasticsearch
Will I lose my cluster data in /var/data/elasticsearch?. I mean should I backup that first?
dpkg does not know anything about your elastic data. it will only reinstall packages in /etc/elasticsearch and /usr/share/elasticsearch
you will loose all your configuration. data will stay as is.
Have you seen that when you start the cluster it says you cannot start with the root user but then you change the /usr/share/elasticsearch and elasticsearch data directory ownership to the elasticsearch user and still the same?
when you try to start systemctl start elasticsearch it need write permission to /etc/elasticsearch dir
chmod 777 /etc/elasticsearch or chown -R elasticsearch:elasticsearch