Data lost after upgrade?

Hey there! I’ve setup a testsystem to evaluate migrating from mariadb for my iot data (iobroker) to influxdb

It’s a linux mint machine (ubuntu based) and I’ve installed influxdb via this repository:

# cat /etc/apt/sources.list.d/influxdb.list  
deb https://repos.influxdata.com/ubuntu focal stable

I’ve had some problems on the system which caused most paths to be read only for a few days.

Now after I’ve sorted that out (without any files having been lost) and I’ve updated all packages and restarted influxdb the localhost:8086 page gave me the freshly installed setup page instead of the testdata I’ve assembled over the last weeks. The organisations and buckets and measurements I’ve collected are not visible anymore.

I still can see lot’s of data files with last modified date between 21st August and 10th of September here: /var/lib/influxdb/.influxdbv2/engine/data/*/autogen/*/*.tsm

It seems after the upgrade, the influxdb now uses /var/lib/influxdb/engine/ instead of /var/lib/influxdb/.influxdbv2/engine/.

How can I get back to my previous dataset that’s at /var/lib/influxdb/.influxdbv2/engine/?

this solved my issue:

service influxdb stop
cd /var/lib/influxdb/
mkdir new_empty
mv -n engine new_empty/
mv -n influxd.bolt new_empty/
mv -n .influxdbv2/* .
service influxdb start

Those directories looked like this before I rearanged them:

# ls -alih /var/lib/influxdb/
total 120K
 13162 drwxr-xr-x 1 influxdb influxdb  114 Sep 13 17:59 .
   545 drwxr-xr-x 1 root     root     1,3K Aug 18 08:02 ..
 13223 drwxr-xr-x 1 influxdb influxdb   18 Jul 23 12:55 .cache
 13165 drwxr-xr-x 1 influxdb influxdb   34 Jul 22 23:31 data
537374 drwxr-xr-x 1 influxdb influxdb   14 Sep 13 17:54 engine
537373 -rw------- 1 influxdb influxdb 128K Sep 13 17:59 influxd.bolt
 13225 drwx------ 1 influxdb influxdb   36 Jul 23 12:55 .influxdbv2
584702 -rw-r--r-- 1 influxdb influxdb    8 Sep 13 17:59 influxd.pid
 13163 drwxr-xr-x 1 influxdb influxdb   14 Jul 23 01:32 meta
 13212 drwx------ 1 influxdb influxdb   34 Jul 22 23:31 wal
# ls -alih /var/lib/influxdb/.influxdbv2/
total 148K
13225 drwx------ 1 influxdb influxdb   36 Jul 23 12:55 .
13162 drwxr-xr-x 1 influxdb influxdb  114 Sep 13 17:59 ..
13227 drwxr-xr-x 1 influxdb influxdb   14 Jul 23 12:59 engine
13226 -rw------- 1 influxdb influxdb 256K Sep 10 08:32 influxd.bolt
2 Likes

@medavoc139 thanks for sharing your solution!!

made my day! sincere thanks

This solved my same problem after upgrade from 2.6.0 to 2.6.1
Thanks

Hi medavoc139,
Thank you, this solved my Problem after upgrade from 2.7.1 to 2.7.3.

You’re an Hero!!!