influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.19k stars 3.51k forks source link

Upgrade influxdb version from 2.4 to 2.7.6, faced issue in UI not opening, and downgrade also didn't work. Ultimately, lost some data which was earlier present. #25018

Open pratikdas44 opened 1 month ago

pratikdas44 commented 1 month ago

Steps to reproduce: List the minimal actions needed to reproduce the behaviour.

  1. Upgrade influxdb version to 2.7.6 in docker-compose file and build influxdb
  2. ...
  3. ...

Expected behaviour: InfluxDB should have been migrated without data loss and without much hassle.

Actual behaviour: Was able to bringup influxdb but Lost some data eventually after trying a lot.

Environment info:

As the title suggest, I upgraded influxdb to 2.7.6 by updating in docker-compose.yml file to 2.7.6. Firstly, influxdb UI was not opening and I am not able to downgrade as well to 2.4.0 and the logs was not showing any error - image

At first try of downgrade - image

At second try of downgrade - image

But, again after updating influxdb version to 2.4.0 in docker compose its not working correctly. image

Influxdb saved already existing bolt and sqlite as backup, have saved those file. I thought of doing some testing later, since files are there but we are not seeing all the data. Some gaps are there.

Ultimately, upgrading from 2.4 to 2.7.6 was very much hassle and in the documentation, it only mentioned about upgrading the version in docker-compose. This is my docker-compose file -

`version: "3" services: influxdb: image: influxdb:2.7.6 container_name: influxdb restart: always ports:

Influxdb 2.4 was storing all data inside /var/lib/influxdb2 but earlier influxdb 2.7 was storing data inside ~/.influxdbv2. After multiple downgrading and upgrading, at last influxdb was storing data at /var/lib/influxdb2 only. And after that, data is lost. On the system, engine size remains same only.