influxdata / influxdata/influxdb

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.

Open
#25,018 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__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:__

* EC2 - r5a.4xlarge
*
__Logs:__

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](https://github.com/influxdata/influxdb/assets/30981073/83fafbb6-ddc7-4a98-baae-02c477463fa4)

At first try of downgrade -
![image](https://github.com/influxdata/influxdb/assets/30981073/6835bc30-1ae6-49f2-8cdc-345dcab3e60e)

At second try of downgrade -
![image](https://github.com/influxdata/influxdb/assets/30981073/4c814f9b-dfe5-41c8-9227-084b68d650e3)

But, again after updating influxdb version to 2.4.0 in docker compose its not working correctly.
![image](https://github.com/influxdata/influxdb/assets/30981073/8c67cf15-810c-4521-8405-a3048e551f8b)

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:
- 8086:8086
networks:
- analytics
command: bash -c "influxd 2>&1 | tee -a /var/log/influxdb/influxdb.log"
volumes:
- /mnt/influxdb/:/var/lib/influxdb2
- ./etc/influxdb:/etc/influxdb
- ./etc/influxdb/log:/var/log/influxdb
logging:
options:
max-size: "10m"
max-file: "3"`

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the docker-compose.yml shown in the issue and compare the mounted /var/lib/influxdb2 path with ~/.influxdbv2, then review the attached upgrade and downgrade logs. Reproduce the 2.4-to-2.7.6 upgrade and downgrade sequence if possible. Done means the UI opens and existing data remains available after migration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose
Domain
databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.